From a18d68776f0f45cbd999e1a23a518d37e58a2dfa Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Wed, 18 Dec 2024 17:26:31 +0900 Subject: [PATCH] chore: add logging --- CHANGELOG.md | 3 ++- dzgui.sh | 4 ++-- helpers/funcs | 7 +++++-- helpers/ui.py | 2 -- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56e0f91..0aaa350 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ ## [5.6.0-beta.18] 2024-12-14 ### Added -- Open Steam workshop subscriptions +- Open Steam workshop subscriptions dialog +- Additional logging ### Fixed - Empty dialog popups if user manually deletes local mods while application is running - Abort DayZ path discovery if VDF if Steam files are not synched diff --git a/dzgui.sh b/dzgui.sh index 05d9cee..ce0e203 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -578,10 +578,10 @@ fetch_helpers_by_sum(){ [[ -f "$config_file" ]] && source "$config_file" declare -A sums sums=( - ["ui.py"]="0e3845ef150ee9863f9160c62dbb24f9" + ["ui.py"]="99544ccef6060125509c4b689a808a15" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["vdf2json.py"]="2f49f6f5d3af919bebaab2e9c220f397" - ["funcs"]="a9745fa5cc2f007bddf0d30032845fbd" + ["funcs"]="98261fdba4323f77c6dd610c1efc4d11" ["lan"]="c62e84ddd1457b71a85ad21da662b9af" ) local author="aclist" diff --git a/helpers/funcs b/helpers/funcs index 88bc082..576b5c3 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -1202,7 +1202,7 @@ legacy_symlinks(){ logger INFO "Removing legacy symlinks" for d in "$game_dir"/*; do if [[ $d =~ @[0-9]+-.+ ]]; then - logger INFO "Unlinking $d" + logger INFO "Unlinking '$d'" unlink "$d" fi done @@ -1212,11 +1212,14 @@ legacy_symlinks(){ logger INFO "Removing legacy encoding format" for d in "${mod_dirs[@]}"; do # suppress errors if mods are downloading at boot + logger INFO "Testing directory '$d'" [[ ! -f "$d/meta.cpp" ]] && continue local id=$(awk -F"= " '/publishedid/ {print $2}' "$d"/meta.cpp | awk -F\; '{print $1}') + logger INFO "Given id is '$id'" local encoded_id=$(echo "$id" | awk '{printf("%c",$1)}' | base64 | sed 's/\//_/g; s/=//g; s/+/]/g') + logger INFO "Resolved id is '$encoded_id'" if [[ -h "$game_dir/@$encoded_id" ]]; then - logger INFO "Unlinking $game_dir/@$encoded_id" + logger INFO "Unlinking '$game_dir/@$encoded_id'" unlink "$game_dir/@$encoded_id" fi done diff --git a/helpers/ui.py b/helpers/ui.py index 793d552..38abd1b 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -2263,8 +2263,6 @@ class LinkDialog(GenericDialog): parent.grid.update_statusbar(tooltip) - - class EntryDialog(GenericDialog): def __init__(self, parent, text, mode, link): super().__init__(parent, text, mode)