changeset 8099:060165bdb0b0 HEAD

mbox lazy writes: Mark messages dirty when their rewrite is delayed to make sure they'll eventually get rewritten.
author Timo Sirainen <tss@iki.fi>
date Thu, 21 Aug 2008 07:14:50 +0300
parents 8f0111854933
children 83aef3a6c0a3
files src/lib-storage/index/mbox/mbox-sync.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-sync.c	Thu Aug 21 02:19:07 2008 +0300
+++ b/src/lib-storage/index/mbox/mbox-sync.c	Thu Aug 21 07:14:50 2008 +0300
@@ -406,6 +406,9 @@
 	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) {