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 $_.
master
Joey Hess 2010-04-20 13:54:24 -04:00
parent 7a92c0aa4a
commit 5d3f787729
1 changed files with 1 additions and 2 deletions

View File

@ -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];
}
}