From: Marco Bettini Date: Mon, 14 Jul 2025 09:19:32 +0000 (+0000) Subject: imapc: imapc_list_update_tree() - Always get a node X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5cb50144cd9c50b4a3c68cb21eb380f4c01d5fc8;p=thirdparty%2Fdovecot%2Fcore.git imapc: imapc_list_update_tree() - Always get a node These are especially needed in the following change that uses LIST (SUBSCRIBED), as \Subscribed, but non-existent, mailboxes must still be returned. --- diff --git a/src/lib-storage/index/imapc/imapc-list.c b/src/lib-storage/index/imapc/imapc-list.c index 9f4fe9919d..746896e3f6 100644 --- a/src/lib-storage/index/imapc/imapc-list.c +++ b/src/lib-storage/index/imapc/imapc-list.c @@ -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; }