From: Joey Hess <joey@kitenet.net>
Date: Mon, 17 Dec 2007 00:40:50 +0000 (-0500)
Subject: loadstate needs to be called even if no pages are being built
X-Git-Tag: 2.16~16
X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/f373b09bf95865b5ea4167434a87c5d497d9df4b

loadstate needs to be called even if no pages are being built
---

diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm
index 0869d6d8f..68ff6a616 100644
--- a/IkiWiki/Plugin/aggregate.pm
+++ b/IkiWiki/Plugin/aggregate.pm
@@ -51,10 +51,11 @@ sub checkconfig () { #{{{
 
 sub needsbuild (@) { #{{{
 	my $needsbuild=shift;
+	
+	loadstate(); # if not already loaded
 
 	foreach my $page (keys %pagestate) {
 		if (grep { $_ eq $pagesources{$page} } @$needsbuild) {
-			loadstate(); # if not already loaded
 			# Mark all feeds originating on this page as removable;
 			# preprocess will unmark those that still exist.
 			remove_feeds($page);