[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync-rewrite.c, 1.70, 1.71
tss at dovecot.org
tss at dovecot.org
Wed Feb 28 19:51:30 UTC 2007
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv13771
Modified Files:
mbox-sync-rewrite.c
Log Message:
The previous broken X-UID header fixing code was still broken...
Index: mbox-sync-rewrite.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-rewrite.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- mbox-sync-rewrite.c 19 Feb 2007 23:29:01 -0000 1.70
+++ mbox-sync-rewrite.c 28 Feb 2007 19:51:28 -0000 1.71
@@ -330,13 +330,16 @@
istream_raw_mbox_get_header_offset(sync_ctx->input);
mail_ctx->mail.body_size = mails[idx].body_size;
- /* mbox_sync_parse_next_mail() checks that UIDs are growing,
- so we have to fool it. */
- sync_ctx->prev_msg_uid = mails[idx].uid == 0 ? 0 : mails[idx].uid-1;
- /* If we originally thought that the UID was broken, force the
- brokeness now also. Otherwise try to make the UID what we wanted
- it originally. */
- sync_ctx->next_uid = mails[idx].uid_broken ? 0 : mail_ctx->mail.uid - 1;
+ if (mails[idx].uid_broken || mails[idx].uid == 0) {
+ /* If we originally thought that the UID was broken, force the
+ brokeness now also. Otherwise try to make the UID what we
+ wanted it originally. */
+ sync_ctx->next_uid = mails[idx].uid;
+ sync_ctx->prev_msg_uid = sync_ctx->next_uid - 1;
+ } else {
+ sync_ctx->next_uid = 1;
+ sync_ctx->prev_msg_uid = 0;
+ }
first_mail_expunge_extra = 1 +
sync_ctx->first_mail_crlf_expunged ? 1 : 0;
More information about the dovecot-cvs
mailing list