Check if install dir is empty

This commit is contained in:
the-sane 2025-04-24 10:40:51 -04:00
parent f13471959a
commit b83a59b6bb

View File

@ -2610,6 +2610,13 @@ install_game_wine() {
fi
fi
if [ "$(ls -A "$install_dir")" ]; then
# The directory is not empty, ask the user if they want to continue
if ! message options "Cancel" "Continue" "The install directory is not empty!\n\nRe-using an existing wine prefix may result in unexpected behavior!\n\n$install_dir"; then
return 1
fi
fi
# Create the game path
mkdir -p "$install_dir"