fs: Fix paths on macOS
This commit is contained in:
parent
14150b5a04
commit
c1da2497a7
@ -137,13 +137,25 @@ namespace hex::fs {
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
for (auto &path : paths) {
|
for (auto &path : paths) {
|
||||||
path = path / "imhex";
|
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())
|
if (auto executablePath = fs::getExecutablePath(); executablePath.has_value())
|
||||||
paths.push_back(executablePath->parent_path());
|
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…
x
Reference in New Issue
Block a user