fix: Delete ISO when extraction fails
This commit is contained in:
parent
f9775e7602
commit
3a8879335f
1 changed files with 2 additions and 1 deletions
|
|
@ -193,7 +193,6 @@ startInstall() {
|
||||||
ISO="$STORAGE/$CUSTOM"
|
ISO="$STORAGE/$CUSTOM"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f "$TMP/$BASE"
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -413,6 +412,7 @@ extractImage() {
|
||||||
if [[ "${iso,,}" == *".esd" ]]; then
|
if [[ "${iso,,}" == *".esd" ]]; then
|
||||||
if ! extractESD "$iso" "$dir"; then
|
if ! extractESD "$iso" "$dir"; then
|
||||||
error "Failed to extract ESD file!"
|
error "Failed to extract ESD file!"
|
||||||
|
rm -f "$iso"
|
||||||
exit 67
|
exit 67
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
|
|
@ -444,6 +444,7 @@ extractImage() {
|
||||||
|
|
||||||
if ! 7z x "$iso" -o"$dir" > /dev/null; then
|
if ! 7z x "$iso" -o"$dir" > /dev/null; then
|
||||||
error "Failed to extract ISO file!"
|
error "Failed to extract ISO file!"
|
||||||
|
rm -f "$iso"
|
||||||
exit 66
|
exit 66
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue