changeset 303:19108e7c5af2 HEAD

Actually, first don't do anything if there's no dirty flags. Then fsck(). Then check again if fsck() removed the dirty flags.
author Timo Sirainen <tss@iki.fi>
date Mon, 23 Sep 2002 20:02:15 +0300
parents 20769b7516a2
children fd304e62e88a
files src/lib-index/mbox/mbox-rewrite.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mbox/mbox-rewrite.c	Mon Sep 23 19:57:58 2002 +0300
+++ b/src/lib-index/mbox/mbox-rewrite.c	Mon Sep 23 20:02:15 2002 +0300
@@ -277,11 +277,16 @@
 
 	i_assert(index->lock_type == MAIL_LOCK_EXCLUSIVE);
 
+	if ((index->header->flags & MAIL_INDEX_FLAG_DIRTY_MESSAGES) == 0) {
+		/* no need to rewrite */
+		return TRUE;
+	}
+
 	if (!mbox_index_fsck(index))
 		return FALSE;
 
 	if ((index->header->flags & MAIL_INDEX_FLAG_DIRTY_MESSAGES) == 0) {
-		/* no need to rewrite */
+		/* fsck() figured out there's no dirty messages after all */
 		return TRUE;
 	}