From: Timo Sirainen Date: Fri, 2 Jul 2004 12:14:13 +0000 (+0300) Subject: fix for mboxes with pseudo header mail X-Git-Tag: 1.1.alpha1~3844 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cece2b9cd692c06025cc0a7a0ff54d996a8c90ef;p=thirdparty%2Fdovecot%2Fcore.git fix for mboxes with pseudo header mail --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/mbox/mbox-sync.c b/src/lib-storage/index/mbox/mbox-sync.c index 3e0867a744..4ed8ed7717 100644 --- a/src/lib-storage/index/mbox/mbox-sync.c +++ b/src/lib-storage/index/mbox/mbox-sync.c @@ -738,6 +738,11 @@ mbox_sync_seek_to_uid(struct mbox_sync_context *sync_ctx, uint32_t uid) /* set to -1, since it's always increased later */ sync_ctx->seq = seq1-1; + if (sync_ctx->seq == 0 && offset != 0) { + /* this mbox has pseudo mail which contains the X-IMAP header */ + sync_ctx->seq++; + } + sync_ctx->idx_seq = seq1; sync_ctx->dest_first_mail = sync_ctx->seq == 0; if (istream_raw_mbox_seek(sync_ctx->input, offset) < 0) {