From: Timo Sirainen Date: Wed, 23 Jul 2008 23:13:11 +0000 (+0300) Subject: mbox: Fixed assert-crash with read-only mbox streams (e.g. zlib plugin) X-Git-Tag: 1.2.alpha1~105 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=424236b2b88a5a7bbde5cf6a6b32189ca3437629;p=thirdparty%2Fdovecot%2Fcore.git mbox: Fixed assert-crash with read-only mbox streams (e.g. zlib plugin) --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/mbox/mbox-file.c b/src/lib-storage/index/mbox/mbox-file.c index 7859094816..1a06e2c175 100644 --- a/src/lib-storage/index/mbox/mbox-file.c +++ b/src/lib-storage/index/mbox/mbox-file.c @@ -125,6 +125,7 @@ void mbox_file_close_stream(struct mbox_mailbox *mbox) if (mbox->mbox_fd == -1) { /* read-only mbox stream */ i_assert(mbox->mbox_readonly); + i_stream_seek(mbox->mbox_file_stream, 0); } else { i_stream_destroy(&mbox->mbox_file_stream); }