]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/amazon_s3.pm
prune: do not prune beyond an optional base directory, and add a test
[ikiwiki.git] / IkiWiki / Plugin / amazon_s3.pm
index cfd8cd3477f81dd0758564994f35979419e330a0..a9da6bf12b69dc62f2ee05f22aaaef2c88fe7dde 100644 (file)
@@ -232,8 +232,9 @@ sub writefile ($$$;$$) {
 }
 
 # This is a wrapper around the real prune.
-sub prune ($) {
+sub prune ($;$) {
        my $file=shift;
+       my $up_to=shift;
 
        my @keys=IkiWiki::Plugin::amazon_s3::file2keys($file);
 
@@ -250,7 +251,7 @@ sub prune ($) {
                }
        }
 
-       return $IkiWiki::Plugin::amazon_s3::subs{'IkiWiki::prune'}->($file);
+       return $IkiWiki::Plugin::amazon_s3::subs{'IkiWiki::prune'}->($file, $up_to);
 }
 
 1