fix: Remove invalid downloads after checksum failures (#1925)

This commit is contained in:
Kroese
2026-07-21 14:34:24 +02:00
committed by GitHub
parent 598ff994f6
commit 49135eb09e
+6 -1
View File
@@ -819,7 +819,12 @@ tryDownload() {
fi
# Status 2 means the completed download failed deterministic validation.
verifyFile "$iso" "$size" "$total" "$sum" || return 2
if ! verifyFile "$iso" "$size" "$total" "$sum"; then
if ! rm -f -- "$iso" "$iso.aria2"; then
warn "failed to remove invalid download \"$iso\"!"
fi
return 2
fi
# Extract the .iso from the compressed archive if needed.
isCompressed "$url" && UNPACK="Y"