]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Fix listing nonexistent subscriptions with children
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 25 Sep 2025 11:46:04 +0000 (14:46 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Tue, 30 Sep 2025 05:48:46 +0000 (05:48 +0000)
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.

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

index a72d7bf805e54885f856a6cedb9ecbb28520b4f8..5b3310a238fe0758abf8b4fde82604133d9f0439 100644 (file)
@@ -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);
        }
 }