changeset 2832:5b19bcd5bb28 HEAD

one more expunge fix..
author Timo Sirainen <tss@iki.fi>
date Tue, 26 Oct 2004 02:54:51 +0300
parents 909ac8c9039d
children a500a6bba13b
files src/lib-storage/index/mbox/mbox-sync.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-sync.c	Tue Oct 26 01:40:56 2004 +0300
+++ b/src/lib-storage/index/mbox/mbox-sync.c	Tue Oct 26 02:54:51 2004 +0300
@@ -585,6 +585,7 @@
 			memset(&mail, 0, sizeof(mail));
 			mail.flags = MBOX_EXPUNGED;
 			mail.offset = mail.from_offset =
+				(sync_ctx->dest_first_mail ? 1 : 0) +
 				mail_ctx->mail.from_offset -
 				sync_ctx->expunged_space;
 			mail.space = sync_ctx->expunged_space;
@@ -635,6 +636,7 @@
 		} else {
 			move_diff = mail_ctx->mail.space;
 			extra_space = sync_ctx->space_diff - needed_space;
+			sync_ctx->expunged_space = 0;
 		}
 		last_seq = sync_ctx->seq - 1;
 		buffer_set_used_size(sync_ctx->mails, sync_ctx->mails->used -