consistency

56-bugfix
szymon 2020-12-14 12:56:36 +01:00
parent 09b809de8f
commit 927638e0b6
1 changed files with 9 additions and 8 deletions

View File

@ -51,9 +51,9 @@ public class ZipDecompressor {
} else {
File parent = file.getParentFile();
if (!parent.isDirectory() && !parent.mkdirs())
throw new IOException("Failed to create directory " + parent);
if (!parent.isDirectory() && !parent.mkdirs()) {
Statics.LOGGER.error("Failed to create {}", parent);
} else {
try (OutputStream outputStream = Files.newOutputStream(file.toPath());
BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(outputStream)) {
IOUtils.copy(zipInputStream, bufferedOutputStream);
@ -62,6 +62,7 @@ public class ZipDecompressor {
}
}
}
}
} catch (IOException e) {
Statics.LOGGER.error("An exception occurred! ", e);
}