[dovecot-cvs] dovecot/src/lib-index/mbox mbox-sync.c,1.35,1.36

cras at procontrol.fi cras at procontrol.fi
Mon Oct 20 07:25:12 EEST 2003


Update of /home/cvs/dovecot/src/lib-index/mbox
In directory danu:/tmp/cvs-serv18061/lib-index/mbox

Modified Files:
	mbox-sync.c 
Log Message:
mbox was always synced when mailbox was opened.



Index: mbox-sync.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mbox/mbox-sync.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- mbox-sync.c	2 Sep 2003 22:33:33 -0000	1.35
+++ mbox-sync.c	20 Oct 2003 03:25:10 -0000	1.36
@@ -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;



More information about the dovecot-cvs mailing list