dovecot: If errors were found while syncing, fsck the index at t...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Nov 16 20:19:51 EET 2007
details: http://hg.dovecot.org/dovecot/rev/eebfe0cd2add
changeset: 6821:eebfe0cd2add
user: Timo Sirainen <tss at iki.fi>
date: Fri Nov 16 20:11:05 2007 +0200
description:
If errors were found while syncing, fsck the index at the end to make sure
everything looks correct.
diffstat:
1 file changed, 4 insertions(+), 5 deletions(-)
src/lib-index/mail-index-sync-update.c | 9 ++++-----
diffs (26 lines):
diff -r 6dfb3969baae -r eebfe0cd2add src/lib-index/mail-index-sync-update.c
--- 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 @@ int mail_index_sync_map(struct mail_inde
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 @@ int mail_index_sync_map(struct mail_inde
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;
More information about the dovecot-cvs
mailing list