Make sure user trophy folder exists before creating files in it

This commit is contained in:
kalaposfos13 2026-03-28 17:48:21 +01:00
parent 96411a17cb
commit 21ae931d34

View File

@ -322,6 +322,7 @@ 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)) {
std::filesystem::create_directories(user_trophy_file.parent_path());
std::error_code discard;
std::filesystem::copy_file(trophyDir / "Xml" / "TROPCONF.XML", user_trophy_file,
discard);