Make sure user trophy folder exists before creating files in it (#4186)

* Make sure user trophy folder exists before creating files in it

* ???
This commit is contained in:
kalaposfos13 2026-03-28 18:34:30 +01:00 committed by GitHub
parent 96411a17cb
commit 1018660ad7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -322,6 +322,8 @@ void Emulator::Run(std::filesystem::path file, std::vector<std::string> args,
Common::FS::GetUserPath(Common::FS::PathType::HomeDir) /
std::to_string(user.user_id) / "trophy" / (npCommId + ".xml");
if (!std::filesystem::exists(user_trophy_file)) {
auto temp = user_trophy_file.parent_path();
std::filesystem::create_directories(temp);
std::error_code discard;
std::filesystem::copy_file(trophyDir / "Xml" / "TROPCONF.XML", user_trophy_file,
discard);