changeset 10251:77b704cda90b HEAD

mbox: Don't close input stream when syncing. This breaks copying.
author Timo Sirainen <tss@iki.fi>
date Thu, 05 Nov 2009 14:28:47 -0500
parents f69c5c25f176
children 5866ea3cfa71
files src/lib-storage/index/mbox/mbox-sync.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-sync.c	Thu Nov 05 14:13:00 2009 -0500
+++ b/src/lib-storage/index/mbox/mbox-sync.c	Thu Nov 05 14:28:47 2009 -0500
@@ -1763,8 +1763,11 @@
 		*lock_id = 0;
 	}
 
-	/* reopen input stream to make sure it has nothing buffered */
-        mbox_file_close_stream(mbox);
+	/* flush input streams' buffers */
+	if (mbox->mbox_stream != NULL)
+		i_stream_sync(mbox->mbox_stream);
+	if (mbox->mbox_file_stream != NULL)
+		i_stream_sync(mbox->mbox_file_stream);
 
 again:
 	if (changed) {