diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2021-11-17 14:28:43 +0100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2021-11-17 14:31:15 +0100 |
commit | e96faadcd6d0adc223deca746a64f5ae46b517f0 (patch) | |
tree | cefa15e2212c9646e4ccd7ea3a8bd0569e041d9f /src | |
parent | 480c883f363912df611c545b05ae0f6f1b9a6c61 (diff) |
Fix XDG_CONFIG_DIRS fallback
According to XDG Base Directory Specification,
it should fall back to /etc/xdg when the env var is not present.
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/util.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 8ae3445c6..5468d1ed1 100644 --- a/src/libutil/util.cc +++ b/src/libutil/util.cc @@ -562,7 +562,7 @@ Path getConfigDir() std::vector<Path> getConfigDirs() { Path configHome = getConfigDir(); - string configDirs = getEnv("XDG_CONFIG_DIRS").value_or(""); + string configDirs = getEnv("XDG_CONFIG_DIRS").value_or("/etc/xdg"); std::vector<Path> result = tokenizeString<std::vector<string>>(configDirs, ":"); result.insert(result.begin(), configHome); return result; |