diff src/lib-storage/index/maildir/maildir-sync.c @ 6883:15df8bb27d7a HEAD

If we did unlocked maildir sync, make sure we sync it later with locking.
author Timo Sirainen <tss@iki.fi>
date Sat, 01 Dec 2007 09:51:43 +0200
parents b1554dea8ee8
children 2bef19ae5233
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-sync.c	Sat Dec 01 09:51:30 2007 +0200
+++ b/src/lib-storage/index/maildir/maildir-sync.c	Sat Dec 01 09:51:43 2007 +0200
@@ -811,6 +811,12 @@
 		maildir_uidlist_sync_finish(ctx->uidlist_sync_ctx);
 	}
 
+	if (!ctx->locked) {
+		/* make sure we sync the maildir later */
+		ctx->mbox->maildir_hdr.new_mtime = 0;
+		ctx->mbox->maildir_hdr.cur_mtime = 0;
+	}
+
 	if (!ctx->mbox->syncing_commit && ctx->locked) {
 		/* NOTE: index syncing here might cause a re-sync due to
 		   files getting lost, so this function might be called