changeset 2703:28693bf81196 HEAD

Remove recent-flags even if flags are dirty.
author Timo Sirainen <tss@iki.fi>
date Fri, 08 Oct 2004 15:01:11 +0300
parents d6f25d0e104a
children 7209877f49a0
files src/lib-storage/index/mbox/mbox-sync.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-sync.c	Fri Oct 08 00:19:05 2004 +0300
+++ b/src/lib-storage/index/mbox/mbox-sync.c	Fri Oct 08 15:01:11 2004 +0300
@@ -372,8 +372,11 @@
 					    &idx_flags, idx_keywords);
 
 		if ((idx_flags & MAIL_INDEX_MAIL_FLAG_DIRTY) != 0) {
-			/* flags are dirty, ignore whatever was in the file */
+			/* flags are dirty, ignore whatever was in the file.
+			   but remove recent flag if needed. */
 			mbox_flags = idx_flags;
+			if (!sync_ctx->ibox->keep_recent)
+				mbox_flags &= ~MAIL_RECENT;
 		} else {
 			mbox_flags = (rec->flags & ~MAIL_FLAGS_MASK) |
 				(mail->flags & MAIL_FLAGS_MASK);