mirror of
https://github.com/aclist/dztui.git
synced 2024-12-28 21:32:36 +01:00
fix: old path reinsertion
This commit is contained in:
parent
f7cb8381d0
commit
0fee425260
1 changed files with 8 additions and 4 deletions
12
dzgui.sh
12
dzgui.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
version=5.2.3
|
version=5.2.4
|
||||||
|
|
||||||
#CONSTANTS
|
#CONSTANTS
|
||||||
aid=221100
|
aid=221100
|
||||||
|
@ -688,6 +688,11 @@ find_library_folder(){
|
||||||
logger INFO "Steam path resolved to: $steam_path"
|
logger INFO "Steam path resolved to: $steam_path"
|
||||||
}
|
}
|
||||||
create_config(){
|
create_config(){
|
||||||
|
#if old path is malformed and this function is forcibly called,
|
||||||
|
#wipe paths from memory before entering the loop to force path rediscovery
|
||||||
|
unset default_steam_path
|
||||||
|
unset steam_path
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
local player_input="$($steamsafe_zenity \
|
local player_input="$($steamsafe_zenity \
|
||||||
--forms \
|
--forms \
|
||||||
|
@ -698,8 +703,7 @@ create_config(){
|
||||||
--text="DZGUI" $sd_res \
|
--text="DZGUI" $sd_res \
|
||||||
--separator="@")"
|
--separator="@")"
|
||||||
#explicitly setting IFS crashes $steamsafe_zenity in loop
|
#explicitly setting IFS crashes $steamsafe_zenity in loop
|
||||||
#and mapfile does not support high ascii delimiters
|
#and mapfile does not support high ascii delimiters, so split fields with newline
|
||||||
#so split fields with newline
|
|
||||||
readarray -t args < <(<<< "$player_input" sed 's/@/\n/g')
|
readarray -t args < <(<<< "$player_input" sed 's/@/\n/g')
|
||||||
name="${args[0]}"
|
name="${args[0]}"
|
||||||
steam_api="${args[1]}"
|
steam_api="${args[1]}"
|
||||||
|
@ -730,7 +734,7 @@ create_config(){
|
||||||
find_library_folder "$default_steam_path"
|
find_library_folder "$default_steam_path"
|
||||||
if [[ -z $steam_path ]]; then
|
if [[ -z $steam_path ]]; then
|
||||||
logger raise_error "Steam path was empty"
|
logger raise_error "Steam path was empty"
|
||||||
zenity --question --text="DayZ not found or not installed at the chosen path." --ok-label="Choose path manually" --cancel-label="Exit"
|
zenity --question --text="DayZ not found or not installed at the Steam library given." --ok-label="Choose path manually" --cancel-label="Exit"
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
logger INFO "User selected file picker"
|
logger INFO "User selected file picker"
|
||||||
file_picker
|
file_picker
|
||||||
|
|
Loading…
Reference in a new issue