From 8b8c6268abd13b509c3167e2d276b9919dc02fdd Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Sat, 13 Jun 2026 03:36:59 +0900 Subject: [PATCH] feat: expunge ephemeral symlinks --- dzgui/util/symlink.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dzgui/util/symlink.py b/dzgui/util/symlink.py index 50fd6fb..7d21539 100644 --- a/dzgui/util/symlink.py +++ b/dzgui/util/symlink.py @@ -16,12 +16,13 @@ def rebuild_symlinks(config: Path) -> None: path = lookup(config, Preferences.DEFAULT) steam_path = Path(path) dayz_path = PeFile.get_nested_app_path(steam_path, APPID_DAYZ) - # NOTE: unlink stale symlinks - # TODO: expunge ephemeral (@C) links (possibility of name collisions) - # if str(file)[:2] == "@C": file.unlink() for file in dayz_path.iterdir(): + # NOTE: unlink stale symlinks if file.is_symlink() and file.exists() is False: file.unlink() + # NOTE: expunge ephemeral (custom) symlinks + if file.is_symlink() and str(file.stem)[:2] == "@C": + file.unlink() workshop = get_local_mod_path(steam_path) # NOTE: create symlinks for missing mods for mod_id in get_local_mod_ids(steam_path):