[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-uidlist.c, 1.51.2.12, 1.51.2.13

tss at dovecot.org tss at dovecot.org
Wed May 16 16:31:12 EEST 2007


Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv22232

Modified Files:
      Tag: branch_1_0
	maildir-uidlist.c 
Log Message:
When recreating dovecot-uidlist file based on dovecot.index, we set next_uid
value wrong if new messages had been added.



Index: maildir-uidlist.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-uidlist.c,v
retrieving revision 1.51.2.12
retrieving revision 1.51.2.13
diff -u -d -r1.51.2.12 -r1.51.2.13
--- maildir-uidlist.c	9 May 2007 13:12:09 -0000	1.51.2.12
+++ maildir-uidlist.c	16 May 2007 13:31:10 -0000	1.51.2.13
@@ -548,7 +548,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;
 }
 



More information about the dovecot-cvs mailing list