From 4af3344f4ffe97479d9b9aa4aa379f222d24b581 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Wed, 18 Oct 2023 19:13:32 +0100 Subject: [PATCH] Add Non-Steam Game: Fix StartDir when using GUI (#942) --- steamtinkerlaunch | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 4fa205be..9ea5aa20 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -6,7 +6,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v14.0.20231019-1" +PROGVERS="v14.0.20231019-2" PROGCMD="${0##*/}" PROGINTERNALPROTNAME="Proton-stl" SHOSTL="stl" @@ -23298,10 +23298,16 @@ function addNonSteamGame { NOSTAPPNAME="${i#*=}" shift ;; -ep=*|--exepath=*) - QEP="${i#*=}"; NOSTEXEPATH="\"$QEP\"" + QEP="${i#*=}"; + if [ -n "$QEP" ]; then + NOSTEXEPATH="\"$QEP\"" + fi shift ;; -sd=*|--startdir=*) - QSD="${i#*=}"; NOSTSTDIR="\"$QSD\"" + QSD="${i#*=}" + if [ -n "$QSD" ] && [ -d "$QSD" ]; then + NOSTSTDIR="\"$QSD\"" + fi shift ;; -ip=*|--iconpath=*) NOSTICONPATH="${i#*=}" @@ -23397,7 +23403,7 @@ function addNonSteamGame { NOSTAPPNAME="${QEP##*/}" fi - if [ -z "${NOSTSTDIR}" ]; then + if [ -z "${NOSTSTDIR}" ] || [ ! -d "${NOSTSTDIR}" ]; then QSD="$(dirname "$QEP")"; NOSTSTDIR="\"$QSD\"" fi