mirror of
https://github.com/the-sane/lug-helper.git
synced 2024-12-28 16:14:21 +00:00
Better location check for backup path
This commit is contained in:
parent
2f31e88f62
commit
168f9341c6
@ -328,7 +328,7 @@ getdirs() {
|
|||||||
if [ "$?" -eq -1 ]; then
|
if [ "$?" -eq -1 ]; then
|
||||||
message warning "An unexpected error has occurred. The helper is unable to proceed."
|
message warning "An unexpected error has occurred. The helper is unable to proceed."
|
||||||
return 1
|
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/"
|
message warning "Please select a backup location outside your Star Citizen directory.\nie. /home/USER/backups/"
|
||||||
else
|
else
|
||||||
# All good or cancel
|
# All good or cancel
|
||||||
@ -378,7 +378,7 @@ getdirs() {
|
|||||||
while read -rp ": " backup_path; do
|
while read -rp ": " backup_path; do
|
||||||
if [ ! -d "$backup_path" ]; then
|
if [ ! -d "$backup_path" ]; then
|
||||||
echo -e "That directory is invalid or does not exist. Please try again.\n"
|
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"
|
echo -e "Please select a backup location outside your Star Citizen directory.\nie. /home/USER/backups/\n"
|
||||||
else
|
else
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user