From: Timo Sirainen Date: Thu, 17 Jun 2004 22:06:40 +0000 (+0300) Subject: X-IMAPbase update fix X-Git-Tag: 1.1.alpha1~3952 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1750a5daf336f2bf921b3ec2cc2a93c5cd19f7b8;p=thirdparty%2Fdovecot%2Fcore.git X-IMAPbase update fix --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/mbox/mbox-sync.c b/src/lib-storage/index/mbox/mbox-sync.c index 3474b83d1c..7c2e29553d 100644 --- a/src/lib-storage/index/mbox/mbox-sync.c +++ b/src/lib-storage/index/mbox/mbox-sync.c @@ -958,6 +958,15 @@ static int mbox_sync_update_imap_base(struct mbox_sync_context *sync_ctx) { struct mbox_sync_mail_context mail_ctx; + if (istream_raw_mbox_seek(sync_ctx->input, 0) < 0) { + /* doesn't begin with a From-line, which is weird because it + just did. */ + mail_storage_set_critical(sync_ctx->ibox->box.storage, + "Unexpectedly lost From-header line from mbox file %s", + sync_ctx->ibox->path); + return -1; + } + sync_ctx->t = mail_index_transaction_begin(sync_ctx->sync_view, FALSE); sync_ctx->update_base_uid_last = sync_ctx->next_uid-1;