From f557e1c486c75add3c4ec898347efcd3183a5624 Mon Sep 17 00:00:00 2001 From: Daniel Johnson Date: Wed, 25 Oct 2023 18:37:13 -0400 Subject: [PATCH] Prophylactically expand ~ for wine prefix access. It should be expanded, but just in case it is not. --- lutris/gui/config/common.py | 2 +- lutris/util/wine/prefix.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lutris/gui/config/common.py b/lutris/gui/config/common.py index e6470f6b4..471788dbf 100644 --- a/lutris/gui/config/common.py +++ b/lutris/gui/config/common.py @@ -613,7 +613,7 @@ class GameDialogCommon(SavableModelessDialog, DialogInstallUIDelegate): except ValueError: ErrorDialog(_("The entered playtime is invalid"), parent=self) return False - + invalid_fields = [] runner_class = import_runner(self.runner_name) runner_instance = runner_class() diff --git a/lutris/util/wine/prefix.py b/lutris/util/wine/prefix.py index aaaf15afe..8803464dd 100644 --- a/lutris/util/wine/prefix.py +++ b/lutris/util/wine/prefix.py @@ -47,7 +47,8 @@ class WinePrefixManager: def __init__(self, path): if not path: logger.warning("No path specified for Wine prefix") - self.path = path + # expanduser() just in case- it should already be expanded. + self.path = os.path.expanduser(path) def get_user_dir(self, default_user=None): user = default_user or os.getenv("USER") or "lutrisuser"