From 5296d2e91e0079fb79ce3745fbefb024e3227876 Mon Sep 17 00:00:00 2001 From: jgoyvaerts Date: Tue, 7 Jun 2022 09:41:52 +0200 Subject: [PATCH] Fix xenia.log file not always being created in the executable folder. --- src/xenia/base/logging.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/xenia/base/logging.cc b/src/xenia/base/logging.cc index ed636e428..700bb3c66 100644 --- a/src/xenia/base/logging.cc +++ b/src/xenia/base/logging.cc @@ -439,9 +439,7 @@ void InitializeLogging(const std::string_view app_name) { if (cvars::log_file.empty()) { // Default to app name. auto file_name = fmt::format("{}.log", app_name); - auto file_path = std::filesystem::path(file_name); - xe::filesystem::CreateParentFolder(file_path); - + auto file_path = xe::filesystem::GetExecutableFolder() / file_name; log_file = xe::filesystem::OpenFile(file_path, "wt"); } else { xe::filesystem::CreateParentFolder(cvars::log_file);