From db71d4852abdd4f089ed59a7d3c51d96b8bb0682 Mon Sep 17 00:00:00 2001 From: Eladash Date: Sat, 14 Mar 2020 08:44:22 +0200 Subject: [PATCH] cellSaveData: Fix adding file entries to PARAM.SFO on error --- rpcs3/Emu/Cell/Modules/cellSaveData.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp index 14ee2e0821..35accbf2ab 100644 --- a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp @@ -1648,8 +1648,6 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v break; } - psf.emplace("*" + file_path, fileSet->fileType == CELL_SAVEDATA_FILETYPE_SECUREFILE); - // clang-format off auto add_to_blist = [&](const std::string& to_add) { @@ -1807,6 +1805,11 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v { break; } + + if (fileSet->fileOperation != CELL_SAVEDATA_FILEOP_DELETE) + { + psf.emplace("*" + file_path, fileSet->fileType == CELL_SAVEDATA_FILETYPE_SECUREFILE); + } } // Write PARAM.SFO and savedata