From 2dafa4555d2a2abd5c2d353838500e49ea060ae2 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 1 Feb 2020 12:16:02 +0200 Subject: [PATCH] - fixed accessing Steam games on Linux and macOS Special $STEAM "environment variable" should not be expanded --- source/common/searchpaths.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/source/common/searchpaths.cpp b/source/common/searchpaths.cpp index 88e504e97..0f06bc10d 100644 --- a/source/common/searchpaths.cpp +++ b/source/common/searchpaths.cpp @@ -202,6 +202,13 @@ TArray CollectSearchPaths() { if (stricmp(key, "Path") == 0) { + // Checking Steam via a list entry allows easy removal if not wanted. + if (stricmp(value, "$STEAM") == 0) + { + G_AddExternalSearchPaths(searchpaths); + continue; + } + FString nice = NicePath(value); if (nice.Len() > 0) { @@ -213,11 +220,6 @@ TArray CollectSearchPaths() { CollectSubdirectories(searchpaths, nice); } - // Checking Steam via a list entry allows easy removal if not wanted. - else if (nice.CompareNoCase("$STEAM") == 0) - { - G_AddExternalSearchPaths(searchpaths); - } else { AddSearchPath(searchpaths, nice);