From: Timo Sirainen Date: Mon, 10 Jul 2017 13:11:48 +0000 (+0300) Subject: lib-storage: Fix mailbox_update() to always update mailbox list index. X-Git-Tag: 2.3.0.rc1~1280 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d167a7d64f64eb98414bdb8c6b65bb75bee2d718;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Fix mailbox_update() to always update mailbox list index. It previously was updating it only if the list index for the mailbox was already fully up-to-date. But that doesn't really matter, because mailbox_update() is supposed to be changing the values regardless. This fixes mailbox_update() to always work with LAYOUT=index. It also fixes mailbox_update() for INBOX to update UIDVALIDITY/GUID. --- diff --git a/src/lib-storage/list/mailbox-list-index-status.c b/src/lib-storage/list/mailbox-list-index-status.c index 9256620a1a..37e8294b9c 100644 --- a/src/lib-storage/list/mailbox-list-index-status.c +++ b/src/lib-storage/list/mailbox-list-index-status.c @@ -712,7 +712,9 @@ void mailbox_list_index_update_mailbox_index(struct mailbox *box, int ret; i_zero(&changes); - if ((ret = index_list_open_view(box, TRUE, &list_view, &changes.seq)) <= 0) + /* update the mailbox list index even if it has some other pending + changes. */ + if ((ret = index_list_open_view(box, FALSE, &list_view, &changes.seq)) <= 0) return; (void)mailbox_list_index_status(box->list, list_view, changes.seq,