Skip to content

Commit

Permalink
proper error code when file not found . This should fix issue #1923 a…
Browse files Browse the repository at this point in the history
…t least bomberman works
  • Loading branch information
gmoralis authored and Nekotekina committed Feb 1, 2017
1 parent 13493ec commit 9eba0ac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rpcs3/Emu/Cell/Modules/cellSaveData.cpp
Expand Up @@ -572,6 +572,11 @@ static NEVER_INLINE s32 savedata_op(ppu_thread& ppu, u32 operation, u32 version,
case CELL_SAVEDATA_FILEOP_READ:
{
fs::file file(dir_path + file_path, fs::read);
if (!file)
{
cellSaveData.error("savedata file not found");
return CELL_SAVEDATA_ERROR_FAILURE;
}
file.seek(fileSet->fileOffset);
fileGet->excSize = static_cast<u32>(file.read(fileSet->fileBuf.get_ptr(), std::min<u32>(fileSet->fileSize, fileSet->fileBufSize)));
break;
Expand Down

0 comments on commit 9eba0ac

Please sign in to comment.