mirror of
https://github.com/aclist/dztui.git
synced 2024-12-28 13:22:35 +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
|
||||
set -o pipefail
|
||||
|
||||
version=5.2.3
|
||||
version=5.2.4
|
||||
|
||||
#CONSTANTS
|
||||
aid=221100
|
||||
|
@ -688,6 +688,11 @@ find_library_folder(){
|
|||
logger INFO "Steam path resolved to: $steam_path"
|
||||
}
|
||||
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
|
||||
local player_input="$($steamsafe_zenity \
|
||||
--forms \
|
||||
|
@ -698,8 +703,7 @@ create_config(){
|
|||
--text="DZGUI" $sd_res \
|
||||
--separator="@")"
|
||||
#explicitly setting IFS crashes $steamsafe_zenity in loop
|
||||
#and mapfile does not support high ascii delimiters
|
||||
#so split fields with newline
|
||||
#and mapfile does not support high ascii delimiters, so split fields with newline
|
||||
readarray -t args < <(<<< "$player_input" sed 's/@/\n/g')
|
||||
name="${args[0]}"
|
||||
steam_api="${args[1]}"
|
||||
|
@ -730,7 +734,7 @@ create_config(){
|
|||
find_library_folder "$default_steam_path"
|
||||
if [[ -z $steam_path ]]; then
|
||||
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
|
||||
logger INFO "User selected file picker"
|
||||
file_picker
|
||||
|
|
Loading…
Reference in a new issue