Mercurial > dovecot > original-hg > dovecot-1.2
changeset 3381:91cc142dd4a2 HEAD
uid-last offset change fixes.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 14 May 2005 15:51:28 +0300 |
parents | bf654e4789a1 |
children | f3696949cb7c |
files | src/lib-storage/index/mbox/mbox-sync-rewrite.c src/lib-storage/index/mbox/mbox-sync-update.c |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-sync-rewrite.c Sat May 14 15:30:16 2005 +0300 +++ b/src/lib-storage/index/mbox/mbox-sync-rewrite.c Sat May 14 15:51:28 2005 +0300 @@ -288,8 +288,10 @@ return -1; } - if (ctx->imapbase_updated) { - i_assert(sync_ctx->dest_first_mail); + if (sync_ctx->dest_first_mail && + (ctx->imapbase_updated || ctx->sync_ctx->base_uid_last != 0)) { + /* the position might have moved as a result of moving + whitespace */ mbox_sync_first_mail_written(ctx, ctx->hdr_offset + move_diff); }
--- a/src/lib-storage/index/mbox/mbox-sync-update.c Sat May 14 15:30:16 2005 +0300 +++ b/src/lib-storage/index/mbox/mbox-sync-update.c Sat May 14 15:51:28 2005 +0300 @@ -42,8 +42,6 @@ ctx->hdr_pos[i] != (size_t)-1) ctx->hdr_pos[i] += diff; } - if (ctx->sync_ctx->dest_first_mail) - ctx->sync_ctx->base_uid_last_offset += diff; if (diff < 0) str_delete(ctx->header, pos, -diff);