mirror of https://github.com/WerWolv/ImHex.git
fs: Fix paths on macOS
This commit is contained in:
parent
14150b5a04
commit
c1da2497a7
|
@ -137,13 +137,25 @@ namespace hex::fs {
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
for (auto &path : paths) {
|
||||
path = path / "imhex";
|
||||
}
|
||||
|
||||
|
||||
#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();
|
||||
std::copy(additionalDirs.begin(), additionalDirs.end(), std::back_inserter(paths));
|
||||
|
||||
|
|
Loading…
Reference in New Issue