changeset 8674:9c0b76fa8ef6 HEAD

Fix to mail_index_transaction_get_next_uid() fix.
author Timo Sirainen <tss@iki.fi>
date Wed, 21 Jan 2009 19:40:19 -0500
parents 8f1fc77aea7e
children 3be909959c02
files src/lib-index/mail-index-transaction.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-index-transaction.c	Wed Jan 21 18:31:12 2009 -0500
+++ b/src/lib-index/mail-index-transaction.c	Wed Jan 21 19:40:19 2009 -0500
@@ -544,7 +544,7 @@
 	hdr = &t->view->map->hdr;
 	next_uid = t->reset || head_hdr->uid_validity != hdr->uid_validity ?
 		1 : hdr->next_uid;
-	if (array_is_created(&t->appends)) {
+	if (array_is_created(&t->appends) && t->highest_append_uid != 0) {
 		/* get next_uid from appends if they have UIDs */
 		i_assert(next_uid <= t->highest_append_uid);
 		next_uid = t->highest_append_uid;