diff --git a/libmat2/office.py b/libmat2/office.py index e48773a0c1e05f8507f0e84b12b4e2c65d3ee762..e79fe58ce9dca883e3bbb4b3c6c5165df9b6ef46 100644 --- a/libmat2/office.py +++ b/libmat2/office.py @@ -98,11 +98,10 @@ class ArchiveBasedAbstractParser(abstract.AbstractParser): full_path = os.path.join(temp_folder, item.filename) if self._specific_cleanup(full_path) is False: - shutil.rmtree(temp_folder) - os.remove(self.output_filename) logging.warning("Something went wrong during deep cleaning of %s", item.filename) - return False + abort = True + continue if item.filename in self.files_to_keep: # those files aren't supported, but we want to add them anyway