]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Fix file pruning code to work if ikiwiki is run with "." as the srcdir.
authorJoey Hess <joey@kitenet.net>
Mon, 10 Dec 2007 20:12:56 +0000 (15:12 -0500)
committerJoey Hess <joey@kitenet.net>
Mon, 10 Dec 2007 20:12:56 +0000 (15:12 -0500)
IkiWiki.pm
debian/changelog

index cdbcd2481948266d1cac838e0179db9a4fe0cfbb..0029fd2e817057e47bc675648127f97283e23c26 100644 (file)
@@ -1067,10 +1067,10 @@ sub file_pruned ($$) { #{{{
        require File::Spec;
        my $file=File::Spec->canonpath(shift);
        my $base=File::Spec->canonpath(shift);
        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}}).')';
 
        my $regexp='('.join('|', @{$config{wiki_file_prune_regexps}}).')';
-       return $file =~ m/$regexp/;
+       return $file =~ m/$regexp/ && $file ne $base;
 } #}}}
 
 sub gettext { #{{{
 } #}}}
 
 sub gettext { #{{{
index 634e84ecc2830f7714790535c2adb6cf265abe81..3ebc0b044e76c36f2cf3726256469acab163edef 100644 (file)
@@ -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.
     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 <joeyh@debian.org>  Mon, 03 Dec 2007 14:47:36 -0500
 
 
  -- Joey Hess <joeyh@debian.org>  Mon, 03 Dec 2007 14:47:36 -0500