changeset 258:0a45c4744f51 HEAD

modifylog opening was buggy
author Timo Sirainen <tss@iki.fi>
date Mon, 16 Sep 2002 12:49:13 +0300
parents 90abe1af4c72
children cdf38b5cc2b7
files src/lib-index/mail-modifylog.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-modifylog.c	Mon Sep 16 11:41:35 2002 +0300
+++ b/src/lib-index/mail-modifylog.c	Mon Sep 16 12:49:13 2002 +0300
@@ -364,7 +364,7 @@
 		(void)unlink(path);
 	}
 
-	if (ret != -1 && hdr.indexid != log->index->indexid) {
+	if (ret > 0 && hdr.indexid != log->index->indexid) {
 		index_set_error(log->index, "IndexID mismatch for modify log "
 				"file %s", path);
 		ret = -1;
@@ -373,12 +373,12 @@
 		(void)unlink(path);
 	}
 
-	if (ret != -1 && hdr.sync_id == SYNC_ID_FULL) {
+	if (ret > 0 && hdr.sync_id == SYNC_ID_FULL) {
 		/* full */
 		ret = 0;
 	}
 
-	if (ret == 1) {
+	if (ret > 0) {
 		log->fd = fd;
 		log->filepath = i_strdup(path);
 	} else {