summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2009-06-12 19:24:47 -0400
committerJoey Hess <joey@kitenet.net>2009-06-12 19:24:47 -0400
commit90b4d079605b72bb50d1da41402d994960e10937 (patch)
treee890291a896914a93e93fe46895e22724b96010a /IkiWiki
parent9d4f803a01adbd83116b31df6636f0dd487f68f0 (diff)
aggregate: Fix storing of changed md5.
The aggregate state merge code neglected to merge changes to the md5 field of an item. Therefore, if an item's md5 changed after initial aggregation, it would be updated, and rewritten, each time thereafter. This was wasteful and indirectly led to some expire problems.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/aggregate.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm
index e1baae666..60c292d52 100644
--- a/IkiWiki/Plugin/aggregate.pm
+++ b/IkiWiki/Plugin/aggregate.pm
@@ -404,6 +404,7 @@ sub mergestate () {
}
# New guids can be created during aggregation.
+ # Guids have a few fields that may be updated during aggregation.
# It's also possible that guids were removed from the on-disk state
# while the aggregation was in process. That would only happen if
# their feed was also removed, so any removed guids added back here
@@ -412,6 +413,11 @@ sub mergestate () {
if (! exists $guids{$guid}) {
$guids{$guid}=$myguids{$guid};
}
+ else {
+ foreach my $field (qw{md5}) {
+ $guids{$guid}->{$field}=$myguids{$guid}->{$field};
+ }
+ }
}
}