changeset 2154:34ea1398a67b HEAD

X-IMAPbase update fix
author Timo Sirainen <tss@iki.fi>
date Fri, 18 Jun 2004 01:06:40 +0300
parents 53288223de6c
children 282e993b92c4
files src/lib-storage/index/mbox/mbox-sync.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-sync.c	Fri Jun 18 00:55:02 2004 +0300
+++ b/src/lib-storage/index/mbox/mbox-sync.c	Fri Jun 18 01:06:40 2004 +0300
@@ -958,6 +958,15 @@
 {
 	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;