Mercurial > dovecot > original-hg > dovecot-1.2
changeset 2831:909ac8c9039d HEAD
expunge logic still wrong. maybe now?
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 26 Oct 2004 01:40:56 +0300 |
parents | f71de5c12419 |
children | 5b19bcd5bb28 |
files | src/lib-storage/index/mbox/mbox-sync.c |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-sync.c Tue Oct 26 01:10:33 2004 +0300 +++ b/src/lib-storage/index/mbox/mbox-sync.c Tue Oct 26 01:40:56 2004 +0300 @@ -629,17 +629,17 @@ needed_space = mail_ctx->mail.space - sync_ctx->space_diff; if ((uoff_t)sync_ctx->space_diff > needed_space + extra_space) { /* don't waste too much on padding */ - sync_ctx->expunged_space = mail_ctx->mail.space - - (needed_space + extra_space); - sync_ctx->space_diff = needed_space + extra_space; + move_diff = needed_space + extra_space; + sync_ctx->expunged_space = + mail_ctx->mail.space - move_diff; } else { - extra_space = sync_ctx->space_diff; + move_diff = mail_ctx->mail.space; + extra_space = sync_ctx->space_diff - needed_space; } last_seq = sync_ctx->seq - 1; buffer_set_used_size(sync_ctx->mails, sync_ctx->mails->used - sizeof(mail_ctx->mail)); end_offset = mail_ctx->mail.from_offset; - move_diff = sync_ctx->space_diff; } else { /* this message gave enough space from headers. rewriting stops at the end of this message's headers. */