ucm: ucm_filename() - avoid double //

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2021-04-13 17:19:54 +02:00
parent 7e4390137a
commit f93a28730a

View File

@ -70,6 +70,8 @@ static void ucm_filename(char *fn, size_t fn_len, long version,
{
const char *env = getenv(version > 1 ? ALSA_CONFIG_UCM2_VAR : ALSA_CONFIG_UCM_VAR);
if (file[0] == '/')
file++;
if (env == NULL)
snprintf(fn, fn_len, "%s/%s/%s%s%s",
snd_config_topdir(), version > 1 ? "ucm2" : "ucm",