From bf83baa8fcc44e8239c4f652f05f561d61eace5b Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 25 May 2020 18:32:43 +0200 Subject: [PATCH] ucm: allow to specify the toplevel directory using '/' as first character in File path Signed-off-by: Jaroslav Kysela --- src/ucm/parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.11.0