Merge pull request #2491 from fewtarius/dev

Fix automount oops, fix games migration.
This commit is contained in:
fewtarius 2023-12-04 12:16:52 -05:00 committed by GitHub
commit 686283fab6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View file

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

View file

@ -151,7 +151,9 @@ function find_games() {
# Assume this is an android boot device and ignore it.
continue
fi
if [ -e "${DEV}" ] && \
ISMOUNTED="$(grep "${DEV}" /proc/mounts) >/dev/null 2>&1"
if [ ! "$?" = 0 ] && \
[ -e "${DEV}" ] && \
[ ! -e "/storage/.please_resize_me" ]
then
GAMES_DEVICE=${DEV}