From 7426eb285feb5204ef7595f966034e8d60a0663d Mon Sep 17 00:00:00 2001 From: Dangles91 Date: Tue, 18 Jul 2017 10:04:53 +1000 Subject: [PATCH] Fixes for save_op_get_list_item Only return data for dir and bind where requested. Some games like Akiba's Trip call this function but don't ask for any data back. --- rpcs3/Emu/Cell/Modules/cellSaveData.cpp | 28 +++++++++++++++---------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp index a94a1efd5f..98b6ce4ba4 100644 --- a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp @@ -743,20 +743,26 @@ s32 static NEVER_INLINE save_op_get_list_item(vm::cptr dirName, vm::ptrdetail, psf.at("DETAIL").as_string()); } - fs::stat_t dir_info{}; - if (!fs::stat(save_path, dir_info)) + if (dir) { - return CELL_SAVEDATA_ERROR_INTERNAL; + fs::stat_t dir_info{}; + if (!fs::stat(save_path, dir_info)) + { + return CELL_SAVEDATA_ERROR_INTERNAL; + } + + // get file stats, namely directory + strcpy_trunc(dir->dirName, dirName.get_ptr()); + dir->atime = dir_info.atime; + dir->ctime = dir_info.ctime; + dir->mtime = dir_info.mtime; } - // get file stats, namely directory - strcpy_trunc(dir->dirName, dirName.get_ptr()); - dir->atime = dir_info.atime; - dir->ctime = dir_info.ctime; - dir->mtime = dir_info.mtime; - - //TODO: Set bind in accordance to any problems - *bind = 0; + if (bind) + { + //TODO: Set bind in accordance to any problems + *bind = 0; + } return CELL_OK; }