changeset 6205:65e12fa51d4d HEAD

We didn't update flags to maildir filenames when maildir was fully synced.
author Timo Sirainen <tss@iki.fi>
date Tue, 07 Aug 2007 11:42:45 +0300
parents 8ab01c7b2927
children 3f6154a837c6
files src/lib-storage/index/maildir/maildir-sync-index.c
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-sync-index.c	Tue Aug 07 01:59:43 2007 +0300
+++ b/src/lib-storage/index/maildir/maildir-sync-index.c	Tue Aug 07 11:42:45 2007 +0300
@@ -392,6 +392,15 @@
 		/* the private flags are stored only in indexes, keep them */
 		ctx->flags |= rec->flags & mbox->ibox.box.private_flags_mask;
 
+		if (index_sync_changes_have(ctx->sync_changes)) {
+			/* apply flag changes to maildir */
+			if (maildir_file_do(mbox, ctx->uid,
+					    maildir_sync_flags, ctx) < 0)
+				ctx->flags |= MAIL_INDEX_MAIL_FLAG_DIRTY;
+			if ((++changes % MAILDIR_SLOW_MOVE_COUNT) == 0)
+				maildir_sync_notify(ctx->maildir_sync_ctx);
+		}
+
 		if ((uflags & MAILDIR_UIDLIST_REC_FLAG_NONSYNCED) != 0) {
 			/* partial syncing */
 			if ((uflags & MAILDIR_UIDLIST_REC_FLAG_NEW_DIR) != 0) {
@@ -403,15 +412,6 @@
 			continue;
 		}
 
-		if (index_sync_changes_have(ctx->sync_changes)) {
-			/* apply flag changes to maildir */
-			if (maildir_file_do(mbox, ctx->uid,
-					    maildir_sync_flags, ctx) < 0)
-				ctx->flags |= MAIL_INDEX_MAIL_FLAG_DIRTY;
-			if ((++changes % MAILDIR_SLOW_MOVE_COUNT) == 0)
-				maildir_sync_notify(ctx->maildir_sync_ctx);
-		}
-
 		if ((rec->flags & MAIL_INDEX_MAIL_FLAG_DIRTY) != 0) {
 			/* we haven't been able to update maildir with this
 			   record's flag changes. don't sync them. */