From: Timo Sirainen Date: Wed, 24 Sep 2025 11:21:51 +0000 (+0300) Subject: lib-storage: Remove unused struct mailbox_list_iter_update_context.update_only X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5a5606be6acf32c5b93ab9bc421648624a3576f0;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Remove unused struct mailbox_list_iter_update_context.update_only It was always FALSE. --- diff --git a/src/lib-storage/list/mailbox-list-iter.c b/src/lib-storage/list/mailbox-list-iter.c index 5b3310a238..290f1ded26 100644 --- a/src/lib-storage/list/mailbox-list-iter.c +++ b/src/lib-storage/list/mailbox-list-iter.c @@ -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 */ diff --git a/src/lib-storage/mailbox-list-private.h b/src/lib-storage/mailbox-list-private.h index 2c7fdfef42..fe1e94be80 100644 --- a/src/lib-storage/mailbox-list-private.h +++ b/src/lib-storage/mailbox-list-private.h @@ -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; };