dovecot: Avoid "first_recent_uid 0 -> 1" errors when upgrading f...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Sep 30 15:52:31 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/392a49f0c69a
changeset: 6507:392a49f0c69a
user: Timo Sirainen <tss at iki.fi>
date: Sun Sep 30 15:52:26 2007 +0300
description:
Avoid "first_recent_uid 0 -> 1" errors when upgrading from v1.0 index files.
diffstat:
1 file changed, 4 insertions(+)
src/lib-index/mail-index-map.c | 4 ++++
diffs (14 lines):
diff -r c83e3272ae88 -r 392a49f0c69a src/lib-index/mail-index-map.c
--- a/src/lib-index/mail-index-map.c Sun Sep 30 15:33:23 2007 +0300
+++ b/src/lib-index/mail-index-map.c Sun Sep 30 15:52:26 2007 +0300
@@ -441,6 +441,10 @@ int mail_index_map_check_header(struct m
if (hdr->seen_messages_count > hdr->messages_count ||
hdr->deleted_messages_count > hdr->messages_count)
return 0;
+ if (hdr->first_recent_uid == 0 && hdr->minor_version == 0) {
+ /* upgrade silently from v1.0 */
+ map->hdr.first_recent_uid = 1;
+ }
if (hdr->first_recent_uid == 0 ||
hdr->first_recent_uid > hdr->next_uid ||
hdr->first_unseen_uid_lowwater > hdr->next_uid ||
More information about the dovecot-cvs
mailing list