prune: do not prune beyond an optional base directory, and add a test
authorSimon McVittie <smcv@debian.org>
Sat, 7 Apr 2012 16:52:29 +0000 (17:52 +0100)
committerSimon McVittie <smcv@debian.org>
Sat, 7 Apr 2012 16:52:29 +0000 (17:52 +0100)
commit5674e7fc1273800554c23ad6194e8a06dee851ae
treec5ae178e0a15350dc44507c5612bd58dae98e2f4
parentf5f41fa59af064ce3d5e038154950aefdc8d6f65
prune: do not prune beyond an optional base directory, and add a test

Previously, prune("wiki/srcdir/sandbox/test.mdwn") could delete srcdir
or even wiki, if they happened to be empty. This is rarely what you
want: there's usually some base directory (destdir, srcdir, transientdir
or another subdirectory of wikistatedir) beyond which you do not want to
delete.
IkiWiki/Plugin/aggregate.pm
IkiWiki/Plugin/amazon_s3.pm
IkiWiki/Plugin/attachment.pm
IkiWiki/Plugin/comments.pm
IkiWiki/Plugin/editpage.pm
IkiWiki/Plugin/po.pm
IkiWiki/Plugin/remove.pm
IkiWiki/Plugin/transient.pm
IkiWiki/Render.pm
t/prune.t [new file with mode: 0755]