From e3fbb490dfc86bde0e3835a19f0469f1b437a005 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 26 Feb 2022 00:10:23 +0100 Subject: [PATCH] fix: ImHex not properly loading plugins on first launch --- lib/libimhex/source/helpers/logger.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libimhex/source/helpers/logger.cpp b/lib/libimhex/source/helpers/logger.cpp index 75b48a530..c38005b82 100644 --- a/lib/libimhex/source/helpers/logger.cpp +++ b/lib/libimhex/source/helpers/logger.cpp @@ -23,7 +23,8 @@ namespace hex::log { void redirectToFile() { if (g_loggerFile.isValid()) return; - for (const auto &path : hex::getPath(ImHexPath::Logs)) { + for (const auto &path : hex::getPath(ImHexPath::Logs, true)) { + fs::create_directories(path); g_loggerFile = File(path / hex::format("{0:%Y%m%d_%H%M%S}.log", fmt::localtime(std::chrono::system_clock::now())), File::Mode::Create); if (g_loggerFile.isValid()) break;