From 168f9341c65a245d95f5ec73b36020839595a8de Mon Sep 17 00:00:00 2001 From: the-sane <3657071+the-sane@users.noreply.github.com> Date: Sat, 21 Nov 2020 09:29:30 -0500 Subject: [PATCH] Better location check for backup path --- lug-helper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lug-helper.sh b/lug-helper.sh index 8aeefe7..3c557de 100755 --- a/lug-helper.sh +++ b/lug-helper.sh @@ -328,7 +328,7 @@ getdirs() { if [ "$?" -eq -1 ]; then message warning "An unexpected error has occurred. The helper is unable to proceed." return 1 - elif [ "$backup_path" = "$game_path" ]; then + elif [[ $backup_path == $game_path* ]]; then message warning "Please select a backup location outside your Star Citizen directory.\nie. /home/USER/backups/" else # All good or cancel @@ -378,7 +378,7 @@ getdirs() { while read -rp ": " backup_path; do if [ ! -d "$backup_path" ]; then echo -e "That directory is invalid or does not exist. Please try again.\n" - elif [ "$backup_path" = "$game_path" ]; then + elif [[ $backup_path == $game_path* ]]; then echo -e "Please select a backup location outside your Star Citizen directory.\nie. /home/USER/backups/\n" else break