From b83a59b6bb54b8b70978c16da9db23b62e1a2238 Mon Sep 17 00:00:00 2001 From: the-sane <3657071+the-sane@users.noreply.github.com> Date: Thu, 24 Apr 2025 10:40:51 -0400 Subject: [PATCH] Check if install dir is empty --- lug-helper.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lug-helper.sh b/lug-helper.sh index e3e77c5..7d53aa1 100755 --- a/lug-helper.sh +++ b/lug-helper.sh @@ -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"