aggregate: Avoid resetting ctime when an item md5 changes.
Besides being wrong to do, this could lead to the wrong item being expired, as follows: If B is added and at the same time A is changed, then A's ctime may be set to the current time, while B's is set to its creation time. Thus the new item, A, is incorrectly removed as older. (This interacted especially badly with the bug fixed by 90b4d079605b72bb50d1da41402d994960e10937.)master
parent
90b4d07960
commit
9151346687
|
@ -650,11 +650,13 @@ sub add_page (@) {
|
||||||
# creation time on record for the new page.
|
# creation time on record for the new page.
|
||||||
utime $mtime, $mtime, "$config{srcdir}/".htmlfn($guid->{page});
|
utime $mtime, $mtime, "$config{srcdir}/".htmlfn($guid->{page});
|
||||||
# Store it in pagectime for expiry code to use also.
|
# Store it in pagectime for expiry code to use also.
|
||||||
$IkiWiki::pagectime{$guid->{page}}=$mtime;
|
$IkiWiki::pagectime{$guid->{page}}=$mtime
|
||||||
|
unless exists $IkiWiki::pagectime{$guid->{page}};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# Dummy value for expiry code.
|
# Dummy value for expiry code.
|
||||||
$IkiWiki::pagectime{$guid->{page}}=time;
|
$IkiWiki::pagectime{$guid->{page}}=time
|
||||||
|
unless exists $IkiWiki::pagectime{$guid->{page}};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ ikiwiki (3.141) UNRELEASED; urgency=low
|
||||||
* Disable the Preferences link if no plugin with an auth hook is enabled.
|
* Disable the Preferences link if no plugin with an auth hook is enabled.
|
||||||
* Updated French translation. Closes: #532654
|
* Updated French translation. Closes: #532654
|
||||||
* aggregate: Fix storing of changed md5.
|
* aggregate: Fix storing of changed md5.
|
||||||
|
* aggregate: Avoid resetting ctime when an item md5 changes.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Tue, 02 Jun 2009 17:03:41 -0400
|
-- Joey Hess <joeyh@debian.org> Tue, 02 Jun 2009 17:03:41 -0400
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue