Fix xenia.log file not always being created in the executable folder.

This commit is contained in:
jgoyvaerts 2022-06-07 09:41:52 +02:00 committed by Gliniak
parent c7da7e1999
commit 5296d2e91e
1 changed files with 1 additions and 3 deletions

View File

@ -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);