From 58049e97c13b9fc81c31eb03df6b3cffc31d0165 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 10 Dec 2007 15:12:56 -0500 Subject: [PATCH] * Fix file pruning code to work if ikiwiki is run with "." as the srcdir. --- IkiWiki.pm | 4 ++-- debian/changelog | 1 + 2 files changed, 3 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 { #{{{ diff --git a/debian/changelog b/debian/changelog index 634e84ecc..3ebc0b044 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,7 @@ ikiwiki (2.16) UNRELEASED; urgency=low wiki rebuild each midnight. * calendar: Work around block html parsing bug in markdown 1.0.1 by enclosing the calendar in an extra div. + * Fix file pruning code to work if ikiwiki is run with "." as the srcdir. -- Joey Hess Mon, 03 Dec 2007 14:47:36 -0500 -- 2.45.0