From fe9c5d22857b3cf736711f4e6c365c6b47b9a16c Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Wed, 21 Jan 2026 16:09:30 +0100 Subject: [PATCH] fix(tools): remove partial file before fallback download attempt --- misc/tools.func | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/tools.func b/misc/tools.func index 15842c5fb..0696c0d9c 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -1778,6 +1778,8 @@ function fetch_and_deploy_gh_release() { # Try primary URL first, fallback to codeload.github.com for complex tag names if ! curl $download_timeout -fsSL -o "$tmpdir/$filename" "$direct_tarball_url" 2>/dev/null; then + # Remove partial/corrupt file from failed attempt before retry + rm -f "$tmpdir/$filename" # Fallback: codeload.github.com - only encode @ not / in tag names local codeload_encoded="${tag_name//@/%40}" local codeload_url="https://codeload.github.com/$repo/tar.gz/refs/tags/$codeload_encoded"