From 58049e97c13b9fc81c31eb03df6b3cffc31d0165 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 10 Dec 2007 15:12:56 -0500 Subject: * Fix file pruning code to work if ikiwiki is run with "." as the srcdir. --- IkiWiki.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'IkiWiki.pm') 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 { #{{{ -- cgit v1.2.3