changeset 320:fb2bb2d2b4a5 HEAD

fsck() before updating the cache.
author Timo Sirainen <tss@iki.fi>
date Thu, 26 Sep 2002 01:10:17 +0300
parents d0cff4da67ac
children 2b2dc11ea0f6
files src/lib-index/mail-index-update-cache.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-index-update-cache.c	Thu Sep 26 00:25:40 2002 +0300
+++ b/src/lib-index/mail-index-update-cache.c	Thu Sep 26 01:10:17 2002 +0300
@@ -37,6 +37,10 @@
 	if (!index->set_lock(index, MAIL_LOCK_EXCLUSIVE))
 		return FALSE;
 
+	/* make sure the index is ok before doing this */
+	if (!index->fsck(index))
+		return FALSE;
+
 	cache_fields = index->header->cache_fields;
 
 	rec = index->lookup(index, 1);