Mercurial > dovecot > original-hg > dovecot-1.2
changeset 6821:eebfe0cd2add HEAD
If errors were found while syncing, fsck the index at the end to make sure
everything looks correct.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 16 Nov 2007 20:11:05 +0200 |
parents | 6dfb3969baae |
children | f814eecd75cd |
files | src/lib-index/mail-index-sync-update.c |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-index-sync-update.c Fri Nov 16 10:41:34 2007 +0200 +++ b/src/lib-index/mail-index-sync-update.c Fri Nov 16 20:11:05 2007 +0200 @@ -811,11 +811,6 @@ map->hdr_copy_buf->used); } - if (sync_map_ctx.errors) { - /* avoid the same syncing errors the next time */ - mail_index_write(index, FALSE); - } - /* restore refcount before closing the view. this is necessary also if map got cloned, because view closing would otherwise destroy it */ map->refcount++; @@ -830,6 +825,10 @@ index->filepath); (void)mail_index_fsck(index); map = index->map; + } else if (sync_map_ctx.errors) { + /* make sure the index looks valid now */ + (void)mail_index_fsck(index); + map = index->map; } *_map = map;