changeset 5624:547c5d58aa08 HEAD

When recreating dovecot-uidlist file based on dovecot.index, we set next_uid value wrong if new messages had been added.
author Timo Sirainen <tss@iki.fi>
date Wed, 16 May 2007 16:31:13 +0300
parents e41accd3d6f1
children ebf443cae951
files src/lib-storage/index/maildir/maildir-uidlist.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-uidlist.c	Tue May 15 20:27:30 2007 +0300
+++ b/src/lib-storage/index/maildir/maildir-uidlist.c	Wed May 16 16:31:13 2007 +0300
@@ -547,7 +547,8 @@
 				      uint32_t uid_validity, uint32_t next_uid)
 {
 	uidlist->uid_validity = uid_validity;
-	if (next_uid != 0)
+	/* set next_uid only if we know newer UIDs haven't been added yet */
+	if (uidlist->next_uid < next_uid)
 		uidlist->next_uid = next_uid;
 }