From e65497ec3b0bfcc8034e20075c827910a7973cc2 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Thu, 3 Aug 2023 21:49:41 +0200 Subject: [PATCH] fix: `/imhex` being appended to Application Support folder paths on macOS Fixes #1221 --- lib/libimhex/source/helpers/fs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libimhex/source/helpers/fs.cpp b/lib/libimhex/source/helpers/fs.cpp index 6d0ae8609..07d3beaa8 100644 --- a/lib/libimhex/source/helpers/fs.cpp +++ b/lib/libimhex/source/helpers/fs.cpp @@ -171,9 +171,6 @@ namespace hex::fs { #endif - for (auto &path : paths) - path = path / "imhex"; - #if defined(OS_MACOS) if (auto executablePath = wolv::io::fs::getExecutablePath(); executablePath.has_value()) @@ -181,6 +178,9 @@ namespace hex::fs { #else + for (auto &path : paths) + path = path / "imhex"; + if (auto executablePath = wolv::io::fs::getExecutablePath(); executablePath.has_value()) paths.push_back(executablePath->parent_path());