From f6abf9c9b8332ca07710225417eee79822e423df Mon Sep 17 00:00:00 2001 From: icenine451 Date: Fri, 29 Mar 2024 16:08:58 -0400 Subject: [PATCH] Only backup RPCS3 data if it exists during post_update --- functions/post_update.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/functions/post_update.sh b/functions/post_update.sh index 20d4142d..b3030442 100644 --- a/functions/post_update.sh +++ b/functions/post_update.sh @@ -283,8 +283,11 @@ post_update() { # The save folder of rpcs3 was inverted so we're moving the saves into the real one log i "RPCS3 saves needs to be migrated, executing." - create_dir "$backups_folder" - zip -rq9 "$backups_folder/$(date +"%0m%0d")_rpcs3_save_data.zip" "$bios_folder/rpcs3/dev_hdd0/home/00000001/savedata" + if [[ "$(ls -A $bios_folder/rpcs3/dev_hdd0/home/00000001/savedata)" ]]; then + log i "Existing RPCS3 savedata found, backing up..." + create_dir "$backups_folder" + zip -rq9 "$backups_folder/$(date +"%0m%0d")_rpcs3_save_data.zip" "$bios_folder/rpcs3/dev_hdd0/home/00000001/savedata" + fi dir_prep "$saves_folder/ps3/rpcs3" "$bios_folder/rpcs3/dev_hdd0/home/00000001/savedata" log i "RPCS3 saves migration completed, a backup was made here: \"$backups_folder/$(date +"%0m%0d")_rpcs3_save_data.zip\"."