From 1750a5daf336f2bf921b3ec2cc2a93c5cd19f7b8 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 18 Jun 2004 01:06:40 +0300 Subject: [PATCH] X-IMAPbase update fix --HG-- branch : HEAD --- src/lib-storage/index/mbox/mbox-sync.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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; -- 2.47.3