changeset 8934:c3287bf89274 HEAD

dbox: Saving shouldn't close any files after all, otherwise locks are lost.
author Timo Sirainen <tss@iki.fi>
date Thu, 05 Mar 2009 18:24:19 -0500
parents 993929dfa5fa
children b8774ddeaf7a
files src/lib-storage/index/dbox/dbox-map.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/dbox/dbox-map.c	Thu Mar 05 17:27:25 2009 -0500
+++ b/src/lib-storage/index/dbox/dbox-map.c	Thu Mar 05 18:24:19 2009 -0500
@@ -481,6 +481,7 @@
 			return 1;
 		}
 		/* can't append to this file anymore */
+#if 0 /* FIXME: we can't close files, otherwise we lose the lock too early */
 		if (files[i-1]->fd != -1) {
 			/* avoid wasting fds by closing the file, but not if
 			   we're also reading from it. */
@@ -490,6 +491,7 @@
 			if (files[i-1]->refcount == 1)
 				dbox_file_close(files[i-1]);
 		}
+#endif
 	}
 	ctx->files_nonappendable_count = count;