mirror of
https://github.com/aclist/dztui.git
synced 2026-08-29 19:27:13 +02:00
feat: expunge ephemeral symlinks
This commit is contained in:
parent
513c445b24
commit
8b8c6268ab
@ -16,12 +16,13 @@ def rebuild_symlinks(config: Path) -> None:
|
|||||||
path = lookup(config, Preferences.DEFAULT)
|
path = lookup(config, Preferences.DEFAULT)
|
||||||
steam_path = Path(path)
|
steam_path = Path(path)
|
||||||
dayz_path = PeFile.get_nested_app_path(steam_path, APPID_DAYZ)
|
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():
|
for file in dayz_path.iterdir():
|
||||||
|
# NOTE: unlink stale symlinks
|
||||||
if file.is_symlink() and file.exists() is False:
|
if file.is_symlink() and file.exists() is False:
|
||||||
file.unlink()
|
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)
|
workshop = get_local_mod_path(steam_path)
|
||||||
# NOTE: create symlinks for missing mods
|
# NOTE: create symlinks for missing mods
|
||||||
for mod_id in get_local_mod_ids(steam_path):
|
for mod_id in get_local_mod_ids(steam_path):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user