From d167a7d64f64eb98414bdb8c6b65bb75bee2d718 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 10 Jul 2017 16:11:48 +0300 Subject: [PATCH] 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. --- src/lib-storage/list/mailbox-list-index-status.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, -- 2.47.3