]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
LAYOUT=index: Fix rebuilding mailbox list index on force-resync
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 15 Jan 2019 23:00:22 +0000 (01:00 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Fri, 25 Jan 2019 10:50:25 +0000 (12:50 +0200)
The if-check was a bit confusing because have_backend==TRUE means that there
the mailbox list index is only an index, while have_backend==FALSE means
that the mailbox list index is the only source for the list of mailboxes
(= list index is the backend).

src/lib-storage/list/mailbox-list-index.c

index f96b9ff7e442519d9a0b85d02a23b03976a9743b..5c55eef1845deccbc2e073a50f64a6b119138b24 100644 (file)
@@ -961,7 +961,7 @@ mailbox_list_index_sync_init(struct mailbox *box,
        struct index_list_mailbox *ibox = INDEX_LIST_STORAGE_CONTEXT(box);
 
        mailbox_list_index_status_sync_init(box);
-       if (ibox->have_backend)
+       if (!ibox->have_backend)
                mailbox_list_index_backend_sync_init(box, flags);
        return ibox->module_ctx.super.sync_init(box, flags);
 }