path-lookup: Correct order of XDG_CONFIG_HOME and XDG_CONFIG_DIRS
According to the XDG Base Directory Specification [1] XDG_CONFIG_HOME should take precedence over XDG_CONFIG_DIRS. Fixes: https://github.com/systemd/systemd/issues/16095 [1]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
This commit is contained in:
committed by
Lennart Poettering
parent
f856778b9c
commit
e3820eeaf1
@@ -181,10 +181,10 @@ static char** user_dirs(
|
||||
if (strv_extend(&res, generator_early) < 0)
|
||||
return NULL;
|
||||
|
||||
if (strv_extend_strv_concat(&res, config_dirs, "/systemd/user") < 0)
|
||||
if (strv_extend(&res, persistent_config) < 0)
|
||||
return NULL;
|
||||
|
||||
if (strv_extend(&res, persistent_config) < 0)
|
||||
if (strv_extend_strv_concat(&res, config_dirs, "/systemd/user") < 0)
|
||||
return NULL;
|
||||
|
||||
/* global config has lower priority than the user config of the same type */
|
||||
|
||||
Reference in New Issue
Block a user