From 4ba702565dfcdc9ac0df368940c21ed6799e33dc Mon Sep 17 00:00:00 2001 From: R1kaB3rN <100738684+R1kaB3rN@users.noreply.github.com> Date: Tue, 13 Feb 2024 17:56:25 -0800 Subject: [PATCH] ulwgl_run.py: always recreate the symlink - Related to https://github.com/Open-Wine-Components/ULWGL-launcher/issues/27 --- ulwgl_run.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ulwgl_run.py b/ulwgl_run.py index c0925f7..7aa9e22 100755 --- a/ulwgl_run.py +++ b/ulwgl_run.py @@ -44,11 +44,9 @@ example usage: def setup_pfx(path: str) -> None: """Create a symlink to the WINE prefix and tracked_files file.""" - if not (Path(path + "/pfx")).expanduser().is_symlink(): - # When creating the symlink, we want it to be in expanded form when passed unexpanded paths - # Example: pfx -> /home/foo/.wine - # NOTE: When parsing a config file, an error can be raised if the prefix doesn't already exist - Path(path + "/pfx").expanduser().symlink_to(Path(path).expanduser()) + if Path(path + "/pfx").expanduser().is_symlink(): + Path(path + "/pfx").expanduser().unlink() + Path(path + "/pfx").expanduser().symlink_to(Path(path).expanduser()) Path(path + "/tracked_files").expanduser().touch()