changeset 1819:c9571aa175f8 HEAD

mbox was always synced when mailbox was opened.
author Timo Sirainen <tss@iki.fi>
date Mon, 20 Oct 2003 06:25:10 +0300
parents 7826e88c5679
children 02bc3ef29b22
files src/lib-index/mbox/mbox-sync.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mbox/mbox-sync.c	Mon Oct 20 06:24:40 2003 +0300
+++ b/src/lib-index/mbox/mbox-sync.c	Mon Oct 20 06:25:10 2003 +0300
@@ -74,8 +74,9 @@
 	}
 	filesize = st.st_size;
 
-	if (index->mbox_ino != st.st_ino ||
-            !CMP_DEV_T(index->mbox_dev, st.st_dev)) {
+	if (index->mbox_fd != -1 &&
+	    (index->mbox_ino != st.st_ino ||
+	     !CMP_DEV_T(index->mbox_dev, st.st_dev))) {
 		/* mbox file was overwritten, close it if it was open */
 		index->mbox_dev = st.st_dev;
 		index->mbox_ino = st.st_ino;