Mercurial > dovecot > original-hg > dovecot-1.2
changeset 262:f5b444bf9157 HEAD
when opening index, sync before updating cached fields so it won't print
warnings if mails were deleted
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 16 Sep 2002 16:09:47 +0300 |
parents | 29cf23950452 |
children | 30ee462a6457 |
files | src/lib-index/mail-index-open.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-index-open.c Mon Sep 16 15:59:06 2002 +0300 +++ b/src/lib-index/mail-index-open.c Mon Sep 16 16:09:47 2002 +0300 @@ -202,6 +202,11 @@ return FALSE; } + /* sync before updating cached fields so it won't print + warnings if mails were deleted */ + if (!index->sync(index)) + return FALSE; + if (hdr->flags & MAIL_INDEX_FLAG_CACHE_FIELDS) { /* need to update cached fields */ if (!mail_index_update_cache(index)) @@ -216,9 +221,6 @@ return FALSE; } - if (!index->sync(index)) - return FALSE; - if (!mail_index_open_init(index, hdr, update_recent)) return FALSE;