From: Jaroslav Kysela Date: Mon, 25 May 2020 16:32:43 +0000 (+0200) Subject: ucm: allow to specify the toplevel directory using '/' as first character in File... X-Git-Tag: v1.2.3~41 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=bf83baa8fcc44e8239c4f652f05f561d61eace5b;p=alsa-lib.git ucm: allow to specify the toplevel directory using '/' as first character in File path Signed-off-by: Jaroslav Kysela --- diff --git a/src/ucm/parser.c b/src/ucm/parser.c index 94b0d37a..44576f18 100644 --- a/src/ucm/parser.c +++ b/src/ucm/parser.c @@ -134,7 +134,8 @@ int uc_mgr_config_load_file(snd_use_case_mgr_t *uc_mgr, int err; 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); if (err < 0) { uc_error("error: failed to open file %s : %d", filename, -errno);