Fix atomicity of savedata/trophy data writes

This commit is contained in:
Eladash 2021-02-22 14:36:35 +02:00 committed by Ivan
parent 932f31e37b
commit d4af8dd89a
3 changed files with 10 additions and 5 deletions

View file

@ -47,7 +47,7 @@ bool TRPLoader::Install(const std::string& dest, bool show)
}
// Create the file in the temporary directory
success = fs::write_file(temp + '/' + vfs::escape(entry.name), fs::create + fs::excl, buffer);
success = fs::write_file<true>(temp + '/' + vfs::escape(entry.name), fs::create + fs::excl, buffer);
if (!success)
{
break;