use prune to delete rendered files
authorJoey Hess <joey@kodama.kitenet.net>
Tue, 15 Jul 2008 02:45:12 +0000 (22:45 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Tue, 15 Jul 2008 02:45:12 +0000 (22:45 -0400)
This handles deleting empty directories too.

IkiWiki/Plugin/aggregate.pm

index f648a3f99f053dd99aa0fb255f5994c20358a327..301fe40f6dcb96ba15cc396ee823ea5509ac7378 100644 (file)
@@ -157,8 +157,9 @@ sub migrate_to_internal { #{{{
                        debug("$oldname not found");
                }
                if (-e $oldoutput) {
+                       use IkiWiki::Render;
                        debug("removing output file $oldoutput");
-                       unlink($oldoutput) || error ("$!");
+                       IkiWIki::prune($oldoutput) || error ("$!");
                }
        }