diff --git a/src/main/java/sirius/biz/storage/layer3/ExtractArchiveJob.java b/src/main/java/sirius/biz/storage/layer3/ExtractArchiveJob.java index be975045c..bb521b77f 100644 --- a/src/main/java/sirius/biz/storage/layer3/ExtractArchiveJob.java +++ b/src/main/java/sirius/biz/storage/layer3/ExtractArchiveJob.java @@ -137,18 +137,21 @@ protected void execute(ProcessContext process) throws Exception { .withContext("size", NLS.formatSize(sourceFile.size()))); try (FileHandle archive = sourceFile.download()) { - extractor.extractAll(sourceFile.name(), - archive.getFile(), - null, - file -> handleExtractedFile(file, - process, - overrideMode, - targetDirectory, - flattenDirs)); + try { + extractor.extractAll(sourceFile.name(), + archive.getFile(), + null, + file -> handleExtractedFile(file, + process, + overrideMode, + targetDirectory, + flattenDirs)); + process.forceUpdateState(NLS.get("ExtractArchiveJob.completed")); + } catch (Exception exception) { + process.handle(exception); + } } - process.forceUpdateState(NLS.get("ExtractArchiveJob.completed")); - if (!process.isErroneous() && process.require(deleteArchiveParameter).booleanValue()) { process.log(ProcessLog.info().withNLSKey("ExtractArchiveJob.deletingArchive")); sourceFile.forceDelete();