diff options
author | Joey Hess <joey@kitenet.net> | 2010-04-20 13:54:24 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-04-20 13:54:24 -0400 |
commit | 5d3f7877299942cbec4fde6054761635d90a089a (patch) | |
tree | d2759e73e8c598effd1df35b3e8f325bcde3d0e2 /IkiWiki | |
parent | 7a92c0aa4aea1bffc9090d982c4b55af9e0b0c02 (diff) |
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 $_.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/comments.pm | 3 |
1 files changed, 1 insertions, 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]; } } |