[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.104, 1.105

cras at dovecot.org cras at dovecot.org
Wed Oct 13 23:40:27 EEST 2004


Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv12975/lib-storage/index/mbox

Modified Files:
	mbox-sync.c 
Log Message:
fix



Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -d -r1.104 -r1.105
--- mbox-sync.c	13 Oct 2004 20:21:21 -0000	1.104
+++ mbox-sync.c	13 Oct 2004 20:40:25 -0000	1.105
@@ -985,6 +985,12 @@
 	if (sync_ctx->expunged_space > 0) {
 		/* copy trailer, then truncate the file */
 		file_size = i_stream_get_size(sync_ctx->file_input);
+		if (file_size == (uoff_t)sync_ctx->expunged_space) {
+			/* everything deleted, the trailer_size still contains
+			   the \n trailer though */
+			trailer_size = 0;
+		}
+
 		i_assert(file_size >= sync_ctx->expunged_space + trailer_size);
 		offset = file_size - sync_ctx->expunged_space - trailer_size;
 



More information about the dovecot-cvs mailing list