From: Joey Hess Date: Wed, 21 Apr 2010 19:59:39 +0000 (-0400) Subject: remember autofiles always X-Git-Tag: 3.20100427~62^2~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a71b92ed5c5572a1384367f8a90e1fc489b3c660;p=ikiwiki.git remember autofiles always This fixes the problem that it did not remember if an autofile is deleted, unless a plugin happened to register the autofile at the same time. With the new code, we just never recreate an autofile more than once. Only downside is that the list of autofiles is never pruned either. And I don't really see a way to prune it. --- diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 09c9121f3..b3afabf32 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -692,7 +692,7 @@ sub gen_autofile ($$$) { } if ((!defined $file) || - (exists $wikistate{$autofiles{$autofile}{plugin}}{deleted_autofile}{$autofile})) { + (exists $wikistate{$autofiles{$autofile}{plugin}}{autofile}{$autofile})) { return; } @@ -702,11 +702,11 @@ sub gen_autofile ($$$) { } if (grep { $_ eq $autofile } @$del) { - $wikistate{$autofiles{$autofile}{plugin}}{deleted_autofile}{$autofile}=1; return; } $autofiles{$autofile}{generator}->(); + $wikistate{$autofiles{$autofile}{plugin}}{autofile}{$autofile}=1; $pages->{$page}=1; return 1; }