ucm: allow to specify the toplevel directory using '/' as first character in File path

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2020-05-25 18:32:43 +02:00
parent f33e596fa6
commit bf83baa8fc

View file

@ -134,7 +134,8 @@ int uc_mgr_config_load_file(snd_use_case_mgr_t *uc_mgr,
int err; int err;
configuration_filename(uc_mgr, filename, sizeof(filename), configuration_filename(uc_mgr, filename, sizeof(filename),
uc_mgr->conf_dir_name, file, ""); file[0] == '/' ? "" : uc_mgr->conf_dir_name,
file, "");
err = uc_mgr_config_load(uc_mgr->conf_format, filename, cfg); err = uc_mgr_config_load(uc_mgr->conf_format, filename, cfg);
if (err < 0) { if (err < 0) {
uc_error("error: failed to open file %s : %d", filename, -errno); uc_error("error: failed to open file %s : %d", filename, -errno);