From: Joey Hess Date: Tue, 20 Apr 2010 17:54:24 +0000 (-0400) Subject: use one parameter form of file_pruned here too X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/5d3f7877299942cbec4fde6054761635d90a089a?ds=sidebyside use one parameter form of file_pruned here too In File::Find, $_ is relative to the current directory, so that is ok. Also, the directory name doesn't need to be stripped from $_. --- diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 1c219b6c6..32e4d0937 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -645,7 +645,7 @@ sub comments_pending () { no_chdir => 1, wanted => sub { $_=decode_utf8($_); - if (IkiWiki::file_pruned($_, $dir)) { + if (IkiWiki::file_pruned($_)) { $File::Find::prune=1; } elsif (! -l $_ && ! -d _) { @@ -653,7 +653,6 @@ sub comments_pending () { my ($f)=/$config{wiki_file_regexp}/; # untaint if (defined $f && $f =~ /\Q._comment\E$/) { my $ctime=(stat($f))[10]; - $f=~s/^\Q$dir\E\/?//; push @ret, [$f, $ctime]; } }