fix: Delete ISO when extraction fails

This commit is contained in:
Kroese 2024-04-13 16:29:14 +02:00 committed by GitHub
parent da9ef0e061
commit ac754853d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -573,6 +573,8 @@ extractImage() {
if [[ "${iso,,}" == *".esd" ]]; then
if ! extractESD "$iso" "$dir"; then
rm -f "$iso"
rm -rf "$TMP"
error "Failed to extract ESD file!"
exit 67
fi
@ -605,6 +607,8 @@ extractImage() {
if ! 7z x "$iso" -o"$dir" > /dev/null; then
error "Failed to extract ISO file!"
rm -f "$iso"
rm -rf "$TMP"
exit 66
fi