From e710bb893f0f380feb7c934a51c71e5f3ebbe64d Mon Sep 17 00:00:00 2001 From: derrod Date: Wed, 16 Dec 2020 11:29:39 +0100 Subject: [PATCH] [core] Fall back to default wine prefix location This and the previous commit fix #41 --- legendary/core.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/legendary/core.py b/legendary/core.py index 165cf28..5f4b43f 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -433,9 +433,11 @@ class LegendaryCore: proton_pfx = self.lgd.config.get(f'{app_name}.env', 'STEAM_COMPAT_DATA_PATH', fallback=None) if proton_pfx: wine_pfx = f'{proton_pfx}/pfx' + if not wine_pfx: + wine_pfx = os.path.expanduser('~/.wine') # if we have a prefix, read the `user.reg` file and get the proper paths. - if wine_pfx: + if os.path.isdir(wine_pfx): wine_reg = read_registry(wine_pfx) wine_folders = get_shell_folders(wine_reg, wine_pfx) # path_vars['{userprofile}'] = user_path