changeset 217:b426c07093d3 HEAD

Don't fsck() at mbox_index_rewrite() if there's no dirty flags.
author Timo Sirainen <tss@iki.fi>
date Tue, 10 Sep 2002 06:35:50 +0300
parents 12f056754b7b
children e506203cffa4
files src/lib-index/mbox/mbox-rewrite.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mbox/mbox-rewrite.c	Tue Sep 10 06:32:42 2002 +0300
+++ b/src/lib-index/mbox/mbox-rewrite.c	Tue Sep 10 06:35:50 2002 +0300
@@ -277,14 +277,14 @@
 
 	i_assert(index->lock_type == MAIL_LOCK_EXCLUSIVE);
 
-	if (!mbox_index_fsck(index))
-		return FALSE;
-
 	if (index->header->flags & MAIL_INDEX_FLAG_DIRTY_MESSAGES) {
 		/* no need to rewrite */
 		return TRUE;
 	}
 
+	if (!mbox_index_fsck(index))
+		return FALSE;
+
 	in_fd = open(index->mbox_path, O_RDWR);
 	if (in_fd == -1) {
 		index_set_error(index, "Can't open mbox file %s: %m",