]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imapc: imapc_list_update_tree() - Always get a node
authorMarco Bettini <marco.bettini@open-xchange.com>
Mon, 14 Jul 2025 09:19:32 +0000 (09:19 +0000)
committerMarco Bettini <marco.bettini@open-xchange.com>
Mon, 14 Jul 2025 10:22:41 +0000 (10:22 +0000)
These are especially needed in the following change that uses LIST (SUBSCRIBED),
as \Subscribed, but non-existent, mailboxes must still be returned.

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

index 9f4fe9919dacaceb7a1b64c5514920c2fdf74893..746896e3f614ad0e202e09186c0924f87525549b 100644 (file)
@@ -246,14 +246,10 @@ imapc_list_update_tree(struct imapc_mailbox_list *list,
        T_BEGIN {
                const char *vname =
                        imapc_list_remote_to_vname(list, remote_name);
-
-               if ((info_flags & MAILBOX_NONEXISTENT) != 0)
-                       node = mailbox_tree_lookup(tree, vname);
-               else
-                       node = mailbox_tree_get(tree, vname, &created);
-       } T_END;
-       if (node != NULL)
+               node = mailbox_tree_get(tree, vname, &created);
                node->flags = info_flags;
+       } T_END;
+
        return node;
 }