Skip to content

Commit

Permalink
lang: Don't create global config in loadLanguage (#1178)
Browse files Browse the repository at this point in the history
  • Loading branch information
sonic2kk authored Oct 2, 2024
1 parent 9765be4 commit 6e5aba7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions steamtinkerlaunch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
PREFIX="/usr"
PROGNAME="SteamTinkerLaunch"
NICEPROGNAME="Steam Tinker Launch"
PROGVERS="v14.0.20241003-1"
PROGVERS="v14.0.20241003-2"
PROGCMD="${0##*/}"
PROGINTERNALPROTNAME="Proton-stl"
SHOSTL="stl"
Expand Down Expand Up @@ -2696,8 +2696,13 @@ function loadLanguage {
writelog "INFO" "${FUNCNAME[0]} - First load the default language '$STLDEFLANG' to make sure all variables are filled"
loadLangFile "$STLDEFLANG"

saveCfg "$STLDEFGLOBALCFG" X
loadCfg "$STLDEFGLOBALCFG" X
# Prevents loadLanguage from creating the global.conf too early when it may be missing values
# i.e. loadLanguage may be called before setSteamPaths, which can result in creating paths without the required Steam path variables set yet
# This can happen with Luxtorpead, where the LUXTORPEDACMD may be written out before `setSteamPaths` has been called to set `STEAMCOMPATTOOL`
if [ -f "$STLDEFGLOBALCFG" ]; then
saveCfg "$STLDEFGLOBALCFG" X
loadCfg "$STLDEFGLOBALCFG" X
fi

writelog "INFO" "${FUNCNAME[0]} - Loading STLLANG from '$STLDEFGLOBALCFG'"

Expand Down

0 comments on commit 6e5aba7

Please sign in to comment.