From 5d3f7877299942cbec4fde6054761635d90a089a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 20 Apr 2010 13:54:24 -0400 Subject: [PATCH] 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 $_. --- IkiWiki/Plugin/comments.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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]; } } -- 2.26.2