dovecot-1.2: mbox lazy writes: Mark messages dirty when their re...

dovecot at dovecot.org dovecot at dovecot.org
Thu Aug 21 07:15:11 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/060165bdb0b0
changeset: 8099:060165bdb0b0
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Aug 21 07:14:50 2008 +0300
description:
mbox lazy writes: Mark messages dirty when their rewrite is delayed
to make sure they'll eventually get rewritten.

diffstat:

1 file changed, 3 insertions(+)
src/lib-storage/index/mbox/mbox-sync.c |    3 +++

diffs (13 lines):

diff -r 8f0111854933 -r 060165bdb0b0 src/lib-storage/index/mbox/mbox-sync.c
--- 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 @@ static void mbox_sync_update_index(struc
 	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) {


More information about the dovecot-cvs mailing list