Mercurial > dovecot > original-hg > dovecot-1.2
changeset 4201:dde86781168f HEAD
Don't assert-crash if first mail is expunged and we're doing a full sync.
author | Timo Sirainen <timo.sirainen@movial.fi> |
---|---|
date | Tue, 18 Apr 2006 17:49:40 +0300 |
parents | 38a5e4396091 |
children | 581b5a12c7b7 |
files | src/lib-storage/index/dbox/dbox-sync-full.c |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/dbox/dbox-sync-full.c Mon Apr 17 22:40:31 2006 +0300 +++ b/src/lib-storage/index/dbox/dbox-sync-full.c Tue Apr 18 17:49:40 2006 +0300 @@ -134,14 +134,19 @@ ARRAY_CREATE(&entry.uid_list, pool_datastack_create(), struct seq_range, 64); - do { + if (mbox->file->seeked_mail_header.expunged != '0') { + /* first mail expunged */ + ret = dbox_file_seek_next_nonexpunged(mbox); + } + while (ret > 0) { if (dbox_sync_full_mail(ctx, &seq) < 0) return -1; seq_range_array_add(&entry.uid_list, 0, seq); seq_range_array_add(&ctx->exists, 0, seq); - } while ((ret = dbox_file_seek_next_nonexpunged(mbox)) > 0); + ret = dbox_file_seek_next_nonexpunged(mbox); + } dbox_uidlist_sync_append(ctx->uidlist_sync_ctx, &entry); return ret; }