mirror of https://github.com/WerWolv/ImHex.git
fix: Executable directory not getting added to paths correctly on Linux
This commit is contained in:
parent
9737b9cd62
commit
f3f1ac939a
|
@ -173,12 +173,15 @@ namespace hex {
|
||||||
std::vector<fs::path> configDirs = xdg::ConfigDirs();
|
std::vector<fs::path> configDirs = xdg::ConfigDirs();
|
||||||
std::vector<fs::path> dataDirs = xdg::DataDirs();
|
std::vector<fs::path> dataDirs = xdg::DataDirs();
|
||||||
|
|
||||||
configDirs.insert(configDirs.begin(), xdg::ConfigHomeDir());
|
configDirs.push_back(xdg::ConfigHomeDir());
|
||||||
dataDirs.insert(dataDirs.begin(), xdg::DataHomeDir());
|
dataDirs.push_back(xdg::DataHomeDir());
|
||||||
|
|
||||||
for (auto &dir : dataDirs)
|
for (auto &dir : dataDirs)
|
||||||
dir = dir / "imhex";
|
dir = dir / "imhex";
|
||||||
|
|
||||||
|
if (!exePath.empty())
|
||||||
|
dataDirs.emplace(dataDirs.begin(), fs::path(exePath.data()).parent_path());
|
||||||
|
|
||||||
switch (path) {
|
switch (path) {
|
||||||
case ImHexPath::Patterns:
|
case ImHexPath::Patterns:
|
||||||
addUserDirs(dataDirs);
|
addUserDirs(dataDirs);
|
||||||
|
@ -224,8 +227,6 @@ namespace hex {
|
||||||
__builtin_unreachable();
|
__builtin_unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!exePath.empty())
|
|
||||||
dataDirs.emplace(dataDirs.begin(), fs::path(exePath.data()).parent_path());
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!listNonExisting) {
|
if (!listNonExisting) {
|
||||||
|
|
Loading…
Reference in New Issue