Merge pull request #2487 from fewtarius/dev

Fix game migration to new path during post-update.
This commit is contained in:
fewtarius 2023-12-04 06:51:17 -05:00 committed by GitHub
commit 7c237e5d89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -99,10 +99,11 @@ fi
### Migration part 2
for GAMES in /storage/games-internal /storage/games-external
do
if [ ! -d "${GAMES}/roms" ]
COUNT=$(find ${GAMES}/roms 2>/dev/null| wc -l)
if [ "${COUNT}" -lt 10 ]
then
mkdir -p "${GAMES}/roms"
mv "${GAMES}/"* "${GAMES}/roms/"
mkdir -p "${GAMES}/roms" 2>/dev/null
mv "${GAMES}/"* "${GAMES}/roms/" 2>/dev/null
fi
done
systemctl restart jelos-automount