mirror of https://github.com/WerWolv/ImHex.git
fs: Fix paths on macOS
This commit is contained in:
parent
14150b5a04
commit
c1da2497a7
|
@ -137,12 +137,24 @@ namespace hex::fs {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
for (auto &path : paths) {
|
for (auto &path : paths) {
|
||||||
path = path / "imhex";
|
path = path / "imhex";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (auto executablePath = fs::getExecutablePath(); executablePath.has_value())
|
|
||||||
paths.push_back(executablePath->parent_path());
|
#if defined(OS_MACOS)
|
||||||
|
|
||||||
|
if (auto executablePath = fs::getExecutablePath(); executablePath.has_value())
|
||||||
|
paths.push_back(*executablePath);
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
if (auto executablePath = fs::getExecutablePath(); executablePath.has_value())
|
||||||
|
paths.push_back(executablePath->parent_path());
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
auto additionalDirs = ImHexApi::System::getAdditionalFolderPaths();
|
auto additionalDirs = ImHexApi::System::getAdditionalFolderPaths();
|
||||||
std::copy(additionalDirs.begin(), additionalDirs.end(), std::back_inserter(paths));
|
std::copy(additionalDirs.begin(), additionalDirs.end(), std::back_inserter(paths));
|
||||||
|
|
Loading…
Reference in New Issue