]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/img.pm
* Deal better with rebuilds that involve moving files; track and clean up the
[ikiwiki.git] / IkiWiki / Plugin / img.pm
index 0503f4097c336b1194e023231d87738238a0b6e2..b1c9db80c969055edc59227b5c79d83945b7b911 100644 (file)
@@ -34,7 +34,7 @@ sub preprocess (@) { #{{{
        push @{$links{$params{page}}}, $image;
        my $file = bestlink($params{page}, $image);
 
-       my $dir = IkiWiki::dirname($file);
+       my $dir = $params{page};
        my $base = IkiWiki::basename($file);
 
        eval q{use Image::Magick};
@@ -50,7 +50,7 @@ sub preprocess (@) { #{{{
 
                my $outfile = "$config{destdir}/$dir/${w}x${h}-$base";
                $imglink = "$dir/${w}x${h}-$base";
-                               
+               
                will_render($params{page}, $imglink);
 
                if (-e $outfile && (-M srcfile($file) >= -M $outfile)) {