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()