From: Timo Sirainen Date: Thu, 21 Aug 2008 04:14:50 +0000 (+0300) Subject: mbox lazy writes: Mark messages dirty when their rewrite is delayed X-Git-Tag: 1.2.alpha1~62 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5d98a279f2726a8c38ef1e8e3c54d6c62d523a65;p=thirdparty%2Fdovecot%2Fcore.git mbox lazy writes: Mark messages dirty when their rewrite is delayed to make sure they'll eventually get rewritten. --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/mbox/mbox-sync.c b/src/lib-storage/index/mbox/mbox-sync.c index fea52e2e9d..abd6556537 100644 --- a/src/lib-storage/index/mbox/mbox-sync.c +++ b/src/lib-storage/index/mbox/mbox-sync.c @@ -406,6 +406,9 @@ static void mbox_sync_update_index(struct mbox_sync_mail_context *mail_ctx, if (!sync_ctx->delay_writes) { /* changes are written to the mbox file */ mbox_flags &= ~MAIL_INDEX_MAIL_FLAG_DIRTY; + } else if (mail_ctx->need_rewrite) { + /* make sure this message gets written later */ + mbox_flags |= MAIL_INDEX_MAIL_FLAG_DIRTY; } if (rec == NULL) {