]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Remove unused struct mailbox_list_iter_update_context.update_only
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 24 Sep 2025 11:21:51 +0000 (14:21 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Tue, 30 Sep 2025 05:48:46 +0000 (05:48 +0000)
It was always FALSE.

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

index 5b3310a238fe0758abf8b4fde82604133d9f0439..290f1ded26f6030b0e8ec266ab94da6448e1eb80 100644 (file)
@@ -1249,21 +1249,17 @@ mailbox_list_iter_update_real(struct mailbox_list_iter_update_context *ctx,
                created = FALSE;
                match = imap_match(ctx->glob, name);
                if (match == IMAP_MATCH_YES) {
-                       node = ctx->update_only ?
-                               mailbox_tree_lookup(ctx->tree_ctx, name) :
-                               mailbox_tree_get(ctx->tree_ctx, name, &created);
+                       node = mailbox_tree_get(ctx->tree_ctx, name, &created);
                        if (created) {
                                node->flags = create_flags;
                                if (create_flags != 0)
                                        node_fix_parents(node);
                        }
-                       if (node != NULL) {
-                               if (!ctx->update_only && add_matched)
-                                       node->flags |= MAILBOX_MATCHED;
-                               if ((always_flags & MAILBOX_CHILDREN) != 0)
-                                       node->flags &= ENUM_NEGATE(MAILBOX_NOCHILDREN);
-                               node->flags |= always_flags;
-                       }
+                       if (add_matched)
+                               node->flags |= MAILBOX_MATCHED;
+                       if ((always_flags & MAILBOX_CHILDREN) != 0)
+                               node->flags &= ENUM_NEGATE(MAILBOX_NOCHILDREN);
+                       node->flags |= always_flags;
                        /* We don't want to show the parent mailboxes unless
                           something else matches them, but if they are matched
                           we want to show them having child subscriptions */
index 2c7fdfef42c0fbbf0415a0070544ca988f8fd9aa..fe1e94be80ccfa7483e15873c5fb4d4be4248406 100644 (file)
@@ -183,7 +183,6 @@ struct mailbox_list_iter_update_context {
        struct imap_match_glob *glob;
        enum mailbox_info_flags leaf_flags, parent_flags;
 
-       bool update_only:1;
        bool match_parents:1;
 };