mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 19:35:49 +00:00
fix: Delete ISO when extraction fails
This commit is contained in:
parent
da9ef0e061
commit
ac754853d0
1 changed files with 4 additions and 0 deletions
|
|
@ -573,6 +573,8 @@ extractImage() {
|
||||||
|
|
||||||
if [[ "${iso,,}" == *".esd" ]]; then
|
if [[ "${iso,,}" == *".esd" ]]; then
|
||||||
if ! extractESD "$iso" "$dir"; then
|
if ! extractESD "$iso" "$dir"; then
|
||||||
|
rm -f "$iso"
|
||||||
|
rm -rf "$TMP"
|
||||||
error "Failed to extract ESD file!"
|
error "Failed to extract ESD file!"
|
||||||
exit 67
|
exit 67
|
||||||
fi
|
fi
|
||||||
|
|
@ -605,6 +607,8 @@ 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"
|
||||||
|
rm -rf "$TMP"
|
||||||
exit 66
|
exit 66
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue