[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-parse.c, 1.45, 1.46

cras at dovecot.org cras at dovecot.org
Thu Oct 27 12:28:25 EEST 2005


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

Modified Files:
	mbox-sync-parse.c 
Log Message:
When expunging the first mail that has X-IMAPbase header and moving it to
next mail, make sure the X-UID header gets appended after X-IMAPbase header.
Otherwise UIDs of all mails will change.



Index: mbox-sync-parse.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-parse.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- mbox-sync-parse.c	16 Aug 2005 23:32:31 -0000	1.45
+++ mbox-sync-parse.c	27 Oct 2005 09:28:23 -0000	1.46
@@ -372,6 +372,13 @@
 	ctx->sync_ctx->prev_msg_uid = value;
 	ctx->mail.uid = value;
 
+	if (ctx->sync_ctx->dest_first_mail && ctx->seq != 1) {
+		/* if we're expunging the first mail, delete this header since
+		   otherwise X-IMAPbase header would be added after this, which
+		   we don't like */
+		return FALSE;
+	}
+
 	ctx->hdr_pos[MBOX_HDR_X_UID] = str_len(ctx->header);
 	ctx->parsed_uid = value;
 	parse_trailing_whitespace(ctx, hdr);



More information about the dovecot-cvs mailing list