From 5cb50144cd9c50b4a3c68cb21eb380f4c01d5fc8 Mon Sep 17 00:00:00 2001 From: Marco Bettini Date: Mon, 14 Jul 2025 09:19:32 +0000 Subject: [PATCH] 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. --- src/lib-storage/index/imapc/imapc-list.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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; } -- 2.47.3