Merge pull request #748 from icenine451/cooker-0.8.0b-icenine451

Only backup RPCS3 data if it exists during post_update
This commit is contained in:
icenine451 2024-03-29 16:09:43 -04:00 committed by GitHub
commit 870f5fc746
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -283,8 +283,11 @@ post_update() {
# The save folder of rpcs3 was inverted so we're moving the saves into the real one # 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." log i "RPCS3 saves needs to be migrated, executing."
if [[ "$(ls -A $bios_folder/rpcs3/dev_hdd0/home/00000001/savedata)" ]]; then
log i "Existing RPCS3 savedata found, backing up..."
create_dir "$backups_folder" create_dir "$backups_folder"
zip -rq9 "$backups_folder/$(date +"%0m%0d")_rpcs3_save_data.zip" "$bios_folder/rpcs3/dev_hdd0/home/00000001/savedata" 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" 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\"." log i "RPCS3 saves migration completed, a backup was made here: \"$backups_folder/$(date +"%0m%0d")_rpcs3_save_data.zip\"."