Atomic PARAM.SFO writes

This commit is contained in:
Eladash 2021-02-21 21:55:07 +02:00 committed by Ivan
parent 0878db4e17
commit 932f31e37b
9 changed files with 108 additions and 11 deletions

View file

@ -1306,7 +1306,12 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v
if (!entry.is_directory)
{
if (entry.name == "PARAM.SFO" || entry.name == "PARAM.PFD")
if (entry.name == "."sv)
{
continue;
}
if (entry.name == "PARAM.SFO"sv || entry.name == "PARAM.PFD"sv)
{
continue; // system files are not included in the file list
}
@ -1899,7 +1904,7 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v
// Write all files in temporary directory
auto& fsfo = all_files["PARAM.SFO"];
fsfo = fs::make_stream<std::vector<uchar>>();
psf::save_object(fsfo, psf);
fsfo.write(psf::save_object(psf));
for (auto&& pair : all_files)
{