Mercurial > dovecot > core-2.2
changeset 20820:0901db0db1c4
lib-index: If view syncing sees index is reset, always mark the view as inconsistent.
Not only when the mailbox has messages, because that could still mess up
assumptions about UIDs. A somewhat better check could have been to do this
only when next_uid>1 (= there have been messages at some point in this
mailbox), but it's safer to just always mark the view as inconsistent.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Tue, 27 Sep 2016 19:48:14 +0300 |
parents | e25ae081b1eb |
children | eac0ad9c3a6c |
files | src/lib-index/mail-index-view-sync.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-index-view-sync.c Tue Sep 27 19:45:57 2016 +0300 +++ b/src/lib-index/mail-index-view-sync.c Tue Sep 27 19:48:14 2016 +0300 @@ -596,7 +596,7 @@ ctx->finish_min_msg_count = reset ? 0 : view->map->hdr.messages_count - expunge_count; - if (reset && view->map->hdr.messages_count > 0) { + if (reset) { view->inconsistent = TRUE; mail_index_set_error(view->index, "%s reset, view is now inconsistent",