update: better unknown configuration error

This commit is contained in:
ngn
2024-08-04 15:39:07 +03:00
parent 773e3f9ac6
commit 2359148d41
2 changed files with 14 additions and 6 deletions

View File

@ -121,7 +121,10 @@ int config_load_handler(void *data, const char *_section, const char *_key, cons
return 1;
unknown:
error(_("Unknown configuration option: %s/%s"), section, key);
if (NULL == section || section[0] == '\0')
error(_("Unknown configuration option: %s"), key);
else
error(_("Unknown configuration option: %s/%s"), section, key);
return 0;
}