From f085af70cafc7f7f95791b25fd0d7ed7de46845e Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Mon, 19 Dec 2022 01:16:07 +0000 Subject: [PATCH] Add `paths::ConfigPath` to the MPQ search list This mitigates the situation where providing `--save-dir` result in no ~/.local/share/diasurgical/devilutionx in the search path --- Source/init.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/init.cpp b/Source/init.cpp index 5e772f3aa..32e79c188 100644 --- a/Source/init.cpp +++ b/Source/init.cpp @@ -117,6 +117,9 @@ std::vector GetMPQSearchPaths() paths.push_back(paths::PrefPath()); if (paths[0] == paths[1]) paths.pop_back(); + paths.push_back(paths::ConfigPath()); + if (paths[0] == paths[1] || (paths.size() == 3 && (paths[0] == paths[2] || paths[1] == paths[2]))) + paths.pop_back(); #if defined(__unix__) && !defined(__ANDROID__) // `XDG_DATA_HOME` is usually the root path of `paths::PrefPath()`, so we only