From 10017feaec75703b484f4d4f066e9d77cc7625ce Mon Sep 17 00:00:00 2001
From: joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Date: Mon, 21 May 2007 02:59:06 +0000
Subject: [PATCH] Clear state after performing aggregation, since it could
 hypothetically change after the lock is dropped, and before the lock is
 regained by the build process. The state will now be reloaded by the build
 process.

---
 IkiWiki/Plugin/aggregate.pm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm
index 082290114..5024975ac 100644
--- a/IkiWiki/Plugin/aggregate.pm
+++ b/IkiWiki/Plugin/aggregate.pm
@@ -41,6 +41,7 @@ sub checkconfig () { #{{{
 		aggregate();
 		expire();
 		savestate();
+		clearstate();
 
 		IkiWiki::unlockwiki();
 	}
@@ -207,6 +208,12 @@ sub savestate () { #{{{
 		error("rename $newfile: $!", $cleanup);
 } #}}}
 
+sub clearstate () { #{{{
+	%feeds=();
+	%guids=();
+	$state_loaded=0;
+} #}}}
+
 sub expire () { #{{{
 	foreach my $feed (values %feeds) {
 		next unless $feed->{expireage} || $feed->{expirecount};
-- 
2.39.5