Legacy PS2 save location cleanup

This commit is contained in:
icenine451 2022-10-17 11:42:53 -04:00
parent 2db9645656
commit de252afee7

View file

@ -312,18 +312,6 @@ post_update() {
# 0.4 -> 0.5
# Perform save and state migration if needed
# Moving PCSX2 Saves if needed
if [[ -d /var/config/PCSX2 ]]; then
mv -fv /var/config/PCSX2/sstates/* $rdhome/states/ps2/pcsx2
mv -fv /var/config/PCSX2/memcards/* $rdhome/saves/ps2/memcards
fi
# Moving Citra saves from legacy location to 0.5.0b structure if needed
if [[ -d $rdhome/saves/Citra ]]; then
mv -fv $rdhome/saves/Citra/* $rdhome/saves/n3ds/citra
rmdir $rdhome/saves/Citra # Old folder cleanup
fi
versionwheresaveschanged="0.4.5b" # Hardcoded break point between unsorted and sorted saves
if [[ $(sed -e "s/\.//g" <<< $hard_version) > $(sed -e "s/\.//g" <<< $versionwheresaveschanged) ]] && [[ ! $(sed -e "s/\.//g" <<< $version) > $(sed -e "s/\.//g" <<< $versionwheresaveschanged) ]]; then # Check if user is upgrading from the version where save organization was changed. Try not to reuse this, it things 0.4.5b is newer than 0.4.5
@ -455,6 +443,22 @@ post_update() {
cp -fv /app/retrodeck/es_settings.xml /var/config/emulationstation/.emulationstation/es_settings.xml # preserve settings if not performing a major update
fi
# Moving PCSX2 Saves if needed
if [[ -d /var/config/PCSX2 ]]; then
mv -fv /var/config/PCSX2/sstates/* $rdhome/states/ps2/pcsx2
mv -fv /var/config/PCSX2/memcards/* $rdhome/saves/ps2/memcards
fi
if [[ -d $rdhome/saves/PS2 ]] # This appears to have been a legacy location that no longer works under the new structure.
mv -fv $rdhome/saves/PS2/* $rdhome/saves/ps2
rmdir $rdhome/saves/PS2
fi
# Moving Citra saves from legacy location to 0.5.0b structure if needed
if [[ -d $rdhome/saves/Citra ]]; then
mv -fv $rdhome/saves/Citra/* $rdhome/saves/n3ds/citra
rmdir $rdhome/saves/Citra # Old folder cleanup
fi
(
ra_init
standalones_init