]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/remove.pm
prune: do not prune beyond an optional base directory, and add a test
[git.ikiwiki.info.git] / IkiWiki / Plugin / remove.pm
index 14ac01c9bcfc390f370f1a8fca74c3b51d7f0baa..3e9f9b82f3326872d3155678570d34785974e1c2 100644 (file)
@@ -124,7 +124,7 @@ sub removal_confirm ($$@) {
                        my $f=IkiWiki::Plugin::attachment::is_held_attachment($page);
                        if (defined $f) {
                                require IkiWiki::Render;
-                               IkiWiki::prune($f);
+                               IkiWiki::prune($f, "$config{wikistatedir}/attachments");
                        }
                }
        }
@@ -235,7 +235,7 @@ sub sessioncgi ($$) {
                        }
                        else {
                                foreach my $file (@files) {
-                                       IkiWiki::prune("$config{srcdir}/$file");
+                                       IkiWiki::prune("$config{srcdir}/$file", $config{srcdir});
                                }
                        }
                        IkiWiki::refresh();