diff --git a/lib/libimhex/source/helpers/fs.cpp b/lib/libimhex/source/helpers/fs.cpp index d9fa62ecc..af59cdf16 100644 --- a/lib/libimhex/source/helpers/fs.cpp +++ b/lib/libimhex/source/helpers/fs.cpp @@ -17,6 +17,7 @@ #include #include +#include namespace hex::fs { @@ -87,14 +88,7 @@ namespace hex::fs { #elif defined(OS_MACOS) - std::fs::path applicationSupportDirPath; - { - auto string = getMacApplicationSupportDirectoryPath(); - applicationSupportDirPath = std::string(string); - macFree(string); - } - - paths.push_back(applicationSupportDirPath); + paths.push_back(wolv::io::fs::getApplicationSupportDirectoryPath()); #elif defined(OS_LINUX) @@ -110,7 +104,7 @@ namespace hex::fs { #if defined(OS_MACOS) - if (auto executablePath = fs::getExecutablePath(); executablePath.has_value()) + if (auto executablePath = wolv::io::fs::getExecutablePath(); executablePath.has_value()) paths.push_back(*executablePath); #else diff --git a/lib/libimhex/source/helpers/stacktrace.cpp b/lib/libimhex/source/helpers/stacktrace.cpp index 1874184ca..412bc0d0d 100644 --- a/lib/libimhex/source/helpers/stacktrace.cpp +++ b/lib/libimhex/source/helpers/stacktrace.cpp @@ -140,7 +140,7 @@ void initialize() { - if (auto executablePath = fs::getExecutablePath(); executablePath.has_value()) { + if (auto executablePath = wolv::io::fs::getExecutablePath(); executablePath.has_value()) { static std::string path = executablePath->string(); s_backtraceState = backtrace_create_state(path.c_str(), 1, [](void *, const char *msg, int) { log::error("{}", msg); }, nullptr); } diff --git a/tests/common/include/hex/test/test_provider.hpp b/tests/common/include/hex/test/test_provider.hpp index 320847de4..da2687437 100644 --- a/tests/common/include/hex/test/test_provider.hpp +++ b/tests/common/include/hex/test/test_provider.hpp @@ -1,6 +1,5 @@ #include -#include #include #include @@ -48,7 +47,7 @@ namespace hex::test { return this->m_data->size(); } - [[nodiscard]] virtual std::string getTypeName() const { return "hex.test.provider.test"; } + [[nodiscard]] virtual std::string getTypeName() const override { return "hex.test.provider.test"; } bool open() override { return true; } void close() override { } diff --git a/tests/helpers/source/file.cpp b/tests/helpers/source/file.cpp index fe5218ec5..636307876 100644 --- a/tests/helpers/source/file.cpp +++ b/tests/helpers/source/file.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include using namespace std::literals::string_literals; @@ -12,21 +12,21 @@ TEST_SEQUENCE("FileAccess") { std::fs::create_directories(FilePath.parent_path()); { - hex::fs::File file(FilePath, hex::fs::File::Mode::Create); + wolv::io::File file(FilePath, wolv::io::File::Mode::Create); TEST_ASSERT(file.isValid()); file.write(FileContent); } { - hex::fs::File file(FilePath, hex::fs::File::Mode::Read); + wolv::io::File file(FilePath, wolv::io::File::Mode::Read); TEST_ASSERT(file.isValid()); TEST_ASSERT(file.readString() == FileContent); } { - hex::fs::File file(FilePath, hex::fs::File::Mode::Write); + wolv::io::File file(FilePath, wolv::io::File::Mode::Write); TEST_ASSERT(file.isValid()); @@ -35,7 +35,7 @@ TEST_SEQUENCE("FileAccess") { } { - hex::fs::File file(FilePath, hex::fs::File::Mode::Read); + wolv::io::File file(FilePath, wolv::io::File::Mode::Read); if (file.isValid()) TEST_FAIL(); } @@ -50,21 +50,21 @@ TEST_SEQUENCE("UTF-8 Path") { std::fs::create_directories(FilePath.parent_path()); { - hex::fs::File file(FilePath, hex::fs::File::Mode::Create); + wolv::io::File file(FilePath, wolv::io::File::Mode::Create); TEST_ASSERT(file.isValid()); file.write(FileContent); } { - hex::fs::File file(FilePath, hex::fs::File::Mode::Read); + wolv::io::File file(FilePath, wolv::io::File::Mode::Read); TEST_ASSERT(file.isValid()); TEST_ASSERT(file.readU8String() == FileContent); } { - hex::fs::File file(FilePath, hex::fs::File::Mode::Write); + wolv::io::File file(FilePath, wolv::io::File::Mode::Write); TEST_ASSERT(file.isValid()); @@ -73,7 +73,7 @@ TEST_SEQUENCE("UTF-8 Path") { } { - hex::fs::File file(FilePath, hex::fs::File::Mode::Read); + wolv::io::File file(FilePath, wolv::io::File::Mode::Read); if (file.isValid()) TEST_FAIL(); } diff --git a/tests/helpers/source/net.cpp b/tests/helpers/source/net.cpp index ec0683952..081ef17bf 100644 --- a/tests/helpers/source/net.cpp +++ b/tests/helpers/source/net.cpp @@ -1,7 +1,7 @@ #include #include -#include +#include #include using namespace std::literals::string_literals; @@ -43,7 +43,7 @@ TEST_SEQUENCE("ContentAPI") { TEST_ASSERT(result.code == 200); - hex::fs::File file(FilePath, hex::fs::File::Mode::Read); + wolv::io::File file(FilePath, wolv::io::File::Mode::Read); if (!file.isValid()) TEST_FAIL();