diff options
author | Joey Hess <joey@kitenet.net> | 2007-12-10 15:12:56 -0500 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2007-12-10 15:12:56 -0500 |
commit | 58049e97c13b9fc81c31eb03df6b3cffc31d0165 (patch) | |
tree | 264eee9f50404463cbd459e4ba0be87e159a2e59 /IkiWiki.pm | |
parent | 64d550b14a38f826c662306d89ebd9f587335658 (diff) | |
download | ikiwiki-58049e97c13b9fc81c31eb03df6b3cffc31d0165.tar ikiwiki-58049e97c13b9fc81c31eb03df6b3cffc31d0165.tar.gz |
* Fix file pruning code to work if ikiwiki is run with "." as the srcdir.
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r-- | IkiWiki.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index cdbcd2481..0029fd2e8 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1067,10 +1067,10 @@ sub file_pruned ($$) { #{{{ require File::Spec; my $file=File::Spec->canonpath(shift); my $base=File::Spec->canonpath(shift); - $file =~ s#^\Q$base\E/*##; + $file =~ s#^\Q$base\E/+##; my $regexp='('.join('|', @{$config{wiki_file_prune_regexps}}).')'; - return $file =~ m/$regexp/; + return $file =~ m/$regexp/ && $file ne $base; } #}}} sub gettext { #{{{ |