From: Timo Sirainen Date: Thu, 25 Sep 2025 11:46:04 +0000 (+0300) Subject: lib-storage: Fix listing nonexistent subscriptions with children X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8ecf2cf4d26cc1885791e43c0b7db92d9014be1f;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Fix listing nonexistent subscriptions with children If both A and A/B were subscribed, but nonexistent, the A/B listing marked A as having been listed already, so it wasn't returned. --- diff --git a/src/lib-storage/list/mailbox-list-iter.c b/src/lib-storage/list/mailbox-list-iter.c index a72d7bf805..5b3310a238 100644 --- a/src/lib-storage/list/mailbox-list-iter.c +++ b/src/lib-storage/list/mailbox-list-iter.c @@ -1019,10 +1019,11 @@ static void mailbox_list_mark_node_visited(struct mailbox_node *node) if (node == NULL) return; - node->flags &= ENUM_NEGATE(MAILBOX_MATCHED|MAILBOX_NONEXISTENT); + node->flags &= ENUM_NEGATE(MAILBOX_MATCHED); while (node->parent != NULL) { node = node->parent; - node->flags &= ENUM_NEGATE(MAILBOX_MATCHED); + if ((node->flags & MAILBOX_SUBSCRIBED) == 0) + node->flags &= ENUM_NEGATE(MAILBOX_MATCHED); } }