sub import {
hook(type => "getsetup", id => "transient", call => \&getsetup);
hook(type => "checkconfig", id => "transient", call => \&checkconfig);
- hook(type => "change", id => "transient", call => \&change);
+ hook(type => "rendered", id => "transient", call => \&rendered);
}
sub getsetup () {
}
}
-sub change (@) {
+sub rendered (@) {
foreach my $file (@_) {
# If the corresponding file exists in the transient underlay
# and isn't actually being used, we can get rid of it.
my $casualty = "$transientdir/$file";
if (srcfile($file) ne $casualty && -e $casualty) {
debug(sprintf(gettext("removing transient version of %s"), $file));
- IkiWiki::prune($casualty);
+ IkiWiki::prune($casualty, $transientdir);
}
}
}