summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorDavid Riebenbauer <davrieb@liegesta.at>2010-02-02 11:01:24 +0100
committerDavid Riebenbauer <davrieb@liegesta.at>2010-02-02 14:04:39 +0100
commitf58f3e1bec41ccf9316f37b014ce0b373c8e49e1 (patch)
treeff37c612c1429b572e20e1c2418a98e159ba6a1a /IkiWiki
parenta8d313aba1094fc6d976c9ba3d09f58b768435c5 (diff)
Revert the effects of find_del_files() for (re)autoadded files.
This also means that if autoadded files are deleted they will just be recreated.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Render.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index dd4d9ca0c..d2fa80fbb 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -392,7 +392,9 @@ sub find_del_files ($) {
else {
push @del, $pagesources{$page};
}
+ $dellinks{$page}= $links{$page};
$links{$page}=[];
+ $delrenderedfiles{$page}= $renderedfiles{$page};
$renderedfiles{$page}=[];
$pagemtime{$page}=0;
}
@@ -642,8 +644,14 @@ sub refresh () {
scan($file);
}
+ my %del_hash = map {$_, 1} @$del;
while (my $autofile = shift (@autofiles)) {
my $page=pagename($autofile);
+ if (exists $del_hash{$page}) {
+ $links{$page}= $dellinks{$page};
+ $renderedfiles{$page}= $delrenderedfiles{$page};
+ delete $del_hash{$page};
+ }
if ($pages->{$page}) {
debug(sprintf(gettext("%s has multiple possible source pages"), $page));
}
@@ -655,6 +663,7 @@ sub refresh () {
scan($autofile);
}
+ $del = [keys %del_hash];
calculate_links();