From: Timo Sirainen Date: Wed, 9 Oct 2024 07:39:59 +0000 (+0300) Subject: config: Allow auto-creating new filters based on settings key paths X-Git-Tag: 2.4.1~575 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=727f79171298e94f8880dc905a1cded4791c60da;p=thirdparty%2Fdovecot%2Fcore.git config: Allow auto-creating new filters based on settings key paths This is especially needed for old-set-parser where e.g. auth_worker_max_count converts to service/auth-worker/process_limit. This worked so far because service/auth was created as a non-default settings filter, so it was simply updated. However, with the next change service/auth becomes a "service default" filter, which can't be directly updated. Instead a whole new non-default service/auth filter must be created. This change shouldn't break anything, although it will now allow auto-creating named list filters in configuration file, e.g. "namespace/inbox/separator=/" will directly work. --- diff --git a/src/config/config-parser.c b/src/config/config-parser.c index 6534a0f4b2..abb1ce5794 100644 --- a/src/config/config-parser.c +++ b/src/config/config-parser.c @@ -812,12 +812,6 @@ again: filter_parser = config_filter_parser_find(ctx, &filter); if (filter_parser == NULL) { - if (filter.filter_name_array && - !filter.default_settings) { - /* don't create new arrays, except for - default settings */ - break; - } /* Verify that this is a filter_name/ prefix. If not, it should be a list/ */ if (l->info->defines[config_key->define_idx].type != SET_FILTER_NAME &&