Fix bug where log file was not generated on first run (#729)

* Fix bug where log file was not generated on first run

This fix resolves issue #727.

On first start, Log::Initialize attempts to create the `azahar-emu/log/`
directory. However, it fails because `azahar-emu/` does not exist. Using
FileUtil::CreateFullPath instead will create both `azahar-emu` and
`log/`.

* Update license header
This commit is contained in:
Taylor Rodríguez 2025-03-20 11:49:51 +00:00 committed by GitHub
parent 3783ac9f49
commit d82be7ac7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,4 +1,4 @@
// Copyright 2014 Citra Emulator Project // Copyright Citra Emulator Project / Azahar Emulator Project
// Licensed under GPLv2 or any later version // Licensed under GPLv2 or any later version
// Refer to the license.txt file included. // Refer to the license.txt file included.
@ -210,7 +210,7 @@ public:
} }
initialization_in_progress_suppress_logging = true; initialization_in_progress_suppress_logging = true;
const auto& log_dir = FileUtil::GetUserPath(FileUtil::UserPath::LogDir); const auto& log_dir = FileUtil::GetUserPath(FileUtil::UserPath::LogDir);
void(FileUtil::CreateDir(log_dir)); void(FileUtil::CreateFullPath(log_dir));
Filter filter; Filter filter;
filter.ParseFilterString(Settings::values.log_filter.GetValue()); filter.ParseFilterString(Settings::values.log_filter.GetValue());
instance = std::unique_ptr<Impl, decltype(&Deleter)>( instance = std::unique_ptr<Impl, decltype(&Deleter)>(