Only remove successfully-extracted ISOs

This commit is contained in:
RichardG867
2022-01-15 18:20:22 -03:00
parent ac83b6bfb0
commit 1bbbdda1b1

View File

@@ -792,11 +792,12 @@ class ISOExtractor(ArchiveExtractor):
# Finish new file.
f_o.close()
# Remove ISO file.
try:
os.remove(file_path)
except:
pass
# Remove ISO file if it was successfully extracted.
if ret:
try:
os.remove(file_path)
except:
pass
return ret