changeset 2546:ea50ff7fe3c2 HEAD

Don't fail if we can't lock cache file.
author Timo Sirainen <tss@iki.fi>
date Fri, 03 Sep 2004 23:16:51 +0300
parents d76795adbbb4
children 021f865e1cfa
files src/lib-index/mail-index-sync-update.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-index-sync-update.c	Fri Sep 03 23:06:46 2004 +0300
+++ b/src/lib-index/mail-index-sync-update.c	Fri Sep 03 23:16:51 2004 +0300
@@ -229,6 +229,7 @@
 	struct mail_index_view *view = ctx->view;
 	struct mail_index_record *rec;
 	uint32_t seq;
+	int ret;
 
 	if (mail_index_lookup_uid_range(view, u->uid, u->uid, &seq, &seq) < 0)
 		return -1;
@@ -242,8 +243,8 @@
 	if (rec->cache_offset != 0 && ctx->update_cache) {
 		/* we'll need to link the old and new cache records */
 		if (!ctx->cache_locked) {
-			if (mail_cache_lock(view->index->cache) <= 0)
-				return -1;
+			if ((ret = mail_cache_lock(view->index->cache)) <= 0)
+				return ret < 0 ? -1 : 1;
 			ctx->cache_locked = TRUE;
 		}