Allow games to list all savedata (#9547)

* cellSaveData - allow games to list all savedata, not only those they own.

Co-authored-by: Megamouse <studienricky89@googlemail.com>
This commit is contained in:
GitArUs 2021-03-06 13:01:04 +00:00 committed by GitHub
parent 228988ca2b
commit f8097a428c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -609,7 +609,13 @@ static NEVER_INLINE error_code savedata_op(ppu_thread& ppu, u32 operation, u32 v
listGet->dirList.set(setBuf->buf.addr());
std::memset(listGet->reserved, 0, sizeof(listGet->reserved));
const auto prefix_list = fmt::split(setList->dirNamePrefix.get_ptr(), {"|"});
auto prefix_list = fmt::split(setList->dirNamePrefix.get_ptr(), {"|"});
// if prefix_list is empty game wants to check all savedata
if (prefix_list.empty() && (operation == SAVEDATA_OP_LIST_LOAD || operation == SAVEDATA_OP_FIXED_LOAD))
{
prefix_list = {""};
}
// get the saves matching the supplied prefix
for (auto&& entry : fs::dir(base_dir))