diff --git a/changelog.md b/changelog.md index 3593b90..9caba80 100644 --- a/changelog.md +++ b/changelog.md @@ -4,7 +4,11 @@ - Clean up logging - Custom query API -## [2.4.2-rc.3] 2022-08-10 +## [2.4.2-rc.4] 2022-08-13 +### Changd +- Clean up legacy symlinks + +## [2.4.2-rc.3] 2022-08-13 ### Fixed - Prevent collisions in symlink IDs diff --git a/dzgui.sh b/dzgui.sh index 351148f..8e0d241 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/bin/bash set -o pipefail -version=2.4.2-rc.2 +version=2.4.2-rc.4 aid=221100 game="dayz" workshop="steam://url/CommunityFilePage/" @@ -348,6 +348,14 @@ legacy_symlinks(){ unlink "$d" fi done + for d in "$workshop_dir"/*; do + local id=$(awk -F"= " '/publishedid/ {print $2}' "$d"/meta.cpp | awk -F\; '{print $1}') + local encoded_id=$(echo "$id" | awk '{printf("%c",$1)}' | base64 | sed 's/\//_/g; s/=//g; s/+/]/g') + if [[ -h "$game_dir/@$encoded_id" ]]; then + unlink "$game_dir/@$encoded_id" + fi + done + exit } symlinks(){ for d in "$workshop_dir"/*; do