X-Git-Url: http://www.average.org/gitweb/?p=mkgallery.git;a=blobdiff_plain;f=mkgallery.pl;h=747cb6c6c7187708fe5e94c2978c9144e78676cc;hp=f7ef6c3e7ef4ff41411a9b379e9b42e4e8269310;hb=06a8a4d9a7533249cfb200e0ddcaff3d76f6b41f;hpb=c54609fad7876eddd650ffc960d1fa463cf44845 diff --git a/mkgallery.pl b/mkgallery.pl index f7ef6c3..747cb6c 100755 --- a/mkgallery.pl +++ b/mkgallery.pl @@ -117,7 +117,6 @@ sub new { $class = $this; my $root=shift; $self = { - -depth=>0, -root=>$root, -fullpath=>$root, }; @@ -159,6 +158,7 @@ sub initpaths { $pos=index($inc,'/',$pos+1)) { $dp++; } + $self->{-depth} = $dp; for ($pos=length($fullpath);$dp>0 && $pos>0; $pos=rindex($fullpath,'/',$pos-1)) { $dp--; @@ -174,6 +174,7 @@ sub initpaths { $self->{-inc} = 'NO-.INCLUDE-IN-PATH/'; # won't work anyway $self->{-rss} = ''; $self->{-relpath} = ''; + $self->{-depth} = 0; } } @@ -598,6 +599,7 @@ sub makeaux { warn "cannot open \"$fn\": $!"; return; } + binmode($F, ":utf8"); my $imgsrc = sprintf("../.%s/%s",$sizes[0],$name); print $F start_html(-title=>$title, -encoding=>"utf-8",