Do not read config.files.log.ftl from the TOML file if it has been set to NULL due to permissions issues during startup

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2024-08-09 19:14:34 +02:00
parent 56593936a8
commit a2d1d16e61
+6
View File
@@ -141,6 +141,12 @@ bool readFTLtoml(struct config *oldconf, struct config *newconf,
struct conf_item *old_conf_item = oldconf != NULL ? get_conf_item(oldconf, i) : NULL;
struct conf_item *new_conf_item = get_conf_item(newconf, i);
// Do not read config.files.log.ftl from the TOML file if it has been
// set to NULL due to permissions issues during startup
if(config.files.log.ftl.v.s == NULL &&
new_conf_item == &newconf->files.log.ftl)
continue;
// First try to read this config option from an environment variable
// Skip reading environment variables when importing from Teleporter
// If this succeeds, skip searching the TOML file for this config item