From 11c29112c21d65e46208cf8d19fd48ef7a6a7511 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Thu, 15 Jan 2026 05:18:13 +0900 Subject: [PATCH] fix: write file after wiping cache --- .github/ISSUE_TEMPLATE/bug_report.yml | 4 ++++ .github/ISSUE_TEMPLATE/trouble.yml | 4 ++++ CHANGELOG.md | 4 ++++ dzgui.sh | 7 +++++-- helpers/funcs | 9 +++++---- 5 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 0ad8d65..e572b50 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -5,6 +5,10 @@ labels: ["bug"] assignees: - aclist body: + - type: markdown + attributes: + value: | + ### WARNING: When posting log/config data, redact any sensitive information like API keys. - type: checkboxes id: kb attributes: diff --git a/.github/ISSUE_TEMPLATE/trouble.yml b/.github/ISSUE_TEMPLATE/trouble.yml index 1c25e69..e890c62 100644 --- a/.github/ISSUE_TEMPLATE/trouble.yml +++ b/.github/ISSUE_TEMPLATE/trouble.yml @@ -5,6 +5,10 @@ labels: ["troubleshooting"] assignees: - aclist body: + - type: markdown + attributes: + value: | + ### WARNING: When posting log/config data, redact any sensitive information like API keys. - type: dropdown id: device attributes: diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b4122b..118a1cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [6.0.0-beta.20] 2026-01-14 +## Fixed +- Write cache file after wiping + ## [6.0.0-beta.19] 2026-01-14 ## Fixed - Steam Deck compatible script path expansion diff --git a/dzgui.sh b/dzgui.sh index 6d13b26..292c9d8 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -3,7 +3,7 @@ set -o pipefail src_path="$(readlink -e "$0")" -version=6.0.0.beta-19 +version=6.0.0.beta-20 #CONSTANTS aid=221100 @@ -41,6 +41,7 @@ cols_file="$state_path/$prefix.cols.json" #CACHE FILES coords_file="$cache_path/$prefix.coords" +src_path_file="$cache_path/$prefix.src" #legacy paths hist_file="$config_path/history" @@ -117,6 +118,7 @@ setup_state_files(){ done logger INFO "Wiped cache files" fi + echo "$src_path" > "$src_path_file" } print_config_vals(){ local keys=( @@ -624,7 +626,7 @@ fetch_helpers_by_sum(){ [[ -f "$config_file" ]] && source "$config_file" declare -A sums sums=( - ["funcs"]="8f44e648bde4fa50adddd3c238c6fe42" + ["funcs"]="1441bb0654b398c68daa22d86275c3ce" ["query_v2.py"]="55d339ba02512ac69de288eb3be41067" ["servers.py"]="ed442c3aecf33f777d59dcf53650d263" ["ui.py"]="3d67e5e8e85a23dde1fd0e85a9be62a9" @@ -691,6 +693,7 @@ get_response_code(){ local url="$1" curl -Ls -I -o /dev/null -w "%{http_code}" "$url" } + fetch_ip_db(){ parse_dl_url(){ curl -Ls "$url" \ diff --git a/helpers/funcs b/helpers/funcs index 2286bdd..f8c602c 100755 --- a/helpers/funcs +++ b/helpers/funcs @@ -1,6 +1,6 @@ #!/usr/bin/env bash set -o pipefail -version="6.0.0-beta.19" +version="6.0.0-beta.20" #CONSTANTS aid=221100 @@ -51,6 +51,7 @@ _cache_binary="$cache_dir/$prefix.binary" _cache_coords="$cache_path/$prefix.coords" _cache_cooldown="$cache_path/$prefix.cooldown" _cache_lan="$cache_path/$prefix.lan" +_cache_src_path="$cache_path/$prefix.src" #XDG freedesktop_path="$HOME/.local/share/applications" @@ -396,6 +397,7 @@ get_dist(){ logger INFO "Distance: $dist km" fi } + query_config(){ [[ -n $2 ]] && local key=$2 keys=( @@ -421,6 +423,7 @@ query_config(){ echo "${!i}" done } + align_versions_file(){ shift local mod="$1" @@ -586,9 +589,6 @@ default_steam_path="$default_steam_path" #Preferred Steam launch command (for Flatpak support) preferred_client="$preferred_client" - -#DZGUI source path -src_path="$src_path" END } format_version_url(){ @@ -642,6 +642,7 @@ download_new_version(){ return 1 fi local version_url="$(format_version_url)" + local src_path="$(< "$_cache_src_path")" mv "$src_path" "$src_path.old" curl -Ls "$version_url" > "$src_path" rc=$?