dovecot: If cache file's version/architecture/indexid changed, m...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jan 31 21:50:10 EET 2008
details: http://hg.dovecot.org/dovecot/rev/a17e3d81a517
changeset: 7205:a17e3d81a517
user: Timo Sirainen <tss at iki.fi>
date: Thu Jan 31 21:50:03 2008 +0200
description:
If cache file's version/architecture/indexid changed, make sure the file
gets unlinked so it gets rebuilt.
diffstat:
1 file changed, 3 insertions(+)
src/lib-index/mail-cache.c | 3 +++
diffs (22 lines):
diff -r c3cb23ed73d1 -r a17e3d81a517 src/lib-index/mail-cache.c
--- a/src/lib-index/mail-cache.c Thu Jan 31 17:33:12 2008 +0200
+++ b/src/lib-index/mail-cache.c Thu Jan 31 21:50:03 2008 +0200
@@ -200,15 +200,18 @@ static bool mail_cache_verify_header(str
if (hdr->version != MAIL_CACHE_VERSION) {
/* version changed - upgrade silently */
+ (void)unlink(cache->filepath);
return FALSE;
}
if (hdr->compat_sizeof_uoff_t != sizeof(uoff_t)) {
/* architecture change - handle silently(?) */
+ (void)unlink(cache->filepath);
return FALSE;
}
if (hdr->indexid != cache->index->indexid) {
/* index id changed - handle silently */
+ (void)unlink(cache->filepath);
return FALSE;
}
if (hdr->file_seq == 0) {
More information about the dovecot-cvs
mailing list