Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lang: Don't create global config in loadLanguage #1178

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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