From b6a288d383bb1ed460e9c9fb5e1c54fe9a435133 Mon Sep 17 00:00:00 2001 From: Eladash Date: Fri, 20 Mar 2020 13:15:58 +0200 Subject: [PATCH] cellSaveData: Skip directory items in savedata_get_list_item --- rpcs3/Emu/Cell/Modules/cellSaveData.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp index 080efbc12e..b38044be1d 100644 --- a/rpcs3/Emu/Cell/Modules/cellSaveData.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSaveData.cpp @@ -1984,6 +1984,11 @@ static NEVER_INLINE error_code savedata_get_list_item(vm::cptr dirName, vm for (const auto& entry : fs::dir(save_path)) { + if (entry.is_directory) + { + continue; + } + size_kbytes += ::narrow((entry.size + 1023) / 1024); // firmware rounds this value up }