]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Fix mailbox_update() to always update mailbox list index.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 10 Jul 2017 13:11:48 +0000 (16:11 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 10 Jul 2017 13:22:17 +0000 (16:22 +0300)
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

index 9256620a1acea0e4f1eaacf5c482de34ad2c139f..37e8294b9ceeb46e5d2ead327f8c781311466f1a 100644 (file)
@@ -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,