]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mbox lazy writes: Mark messages dirty when their rewrite is delayed
authorTimo Sirainen <tss@iki.fi>
Thu, 21 Aug 2008 04:14:50 +0000 (07:14 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 21 Aug 2008 04:14:50 +0000 (07:14 +0300)
to make sure they'll eventually get rewritten.

--HG--
branch : HEAD

src/lib-storage/index/mbox/mbox-sync.c

index fea52e2e9d513940b019f0a7313f71f2cfbdcf07..abd6556537d7bb3213116f655d70913581f0ac77 100644 (file)
@@ -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) {