From c20c489469f17df5dfb755526b32fcf771cf298e Mon Sep 17 00:00:00 2001 From: GloriousEggroll Date: Sun, 24 Mar 2019 14:24:38 -0600 Subject: [PATCH] fix missing break in for loop --- lutris/runners/wine.py | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/lutris/runners/wine.py b/lutris/runners/wine.py index 4afee178a..d02c65e88 100644 --- a/lutris/runners/wine.py +++ b/lutris/runners/wine.py @@ -740,20 +740,21 @@ class wine(Runner): for entry in PROTON_PATH: if entry in wine_path: wine_root = os.path.dirname(os.path.dirname(wine_path)) + else: + break + if WINE_DIR: + wine_root = os.path.dirname(os.path.dirname(wine_path)) else: - if WINE_DIR: - wine_root = os.path.dirname(os.path.dirname(wine_path)) + wine_root = None + if "-4." in wine_path or "/4." in wine_path: + version = "Ubuntu-18.04" else: - wine_root = None - if "-4." in wine_path or "/4." in wine_path: - version = "Ubuntu-18.04" - else: - version = "legacy" - return runtime.get_env( - version=version, - prefer_system_libs=self.system_config.get("prefer_system_libs", True), - wine_path=wine_root - ) + version = "legacy" + return runtime.get_env( + version=version, + prefer_system_libs=self.system_config.get("prefer_system_libs", True), + wine_path=wine_root + ) def get_pids(self, wine_path=None): """Return a list of pids of processes using the current wine exe."""