]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Render.pm
Export add_autofile() for use in Plugins.
[git.ikiwiki.info.git] / IkiWiki / Render.pm
index dd4d9ca0cfe4994544b6d2a0ddebb57a7fc52e8e..d2fa80fbb8fa5f1678627415548fa474ad11d0b0 100644 (file)
@@ -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();