diff --git a/chunky-dedicated/src/main/java/com/funniray/chunkydedicated/ZipDirectory.java b/chunky-dedicated/src/main/java/com/funniray/chunkydedicated/ZipDirectory.java index 7e1c782..d5de197 100644 --- a/chunky-dedicated/src/main/java/com/funniray/chunkydedicated/ZipDirectory.java +++ b/chunky-dedicated/src/main/java/com/funniray/chunkydedicated/ZipDirectory.java @@ -41,16 +41,15 @@ private static void zipFile(File fileToZip, String fileName, ZipOutputStream zip for (File childFile : children) { zipFile(childFile, fileName + "/" + childFile.getName(), zipOut); } - return; - } - FileInputStream fis = new FileInputStream(fileToZip); - ZipEntry zipEntry = new ZipEntry(fileName); - zipOut.putNextEntry(zipEntry); - byte[] bytes = new byte[1024]; - int length; - while ((length = fis.read(bytes)) >= 0) { - zipOut.write(bytes, 0, length); + } else { + FileInputStream fis = new FileInputStream(fileToZip); + ZipEntry zipEntry = new ZipEntry(fileName); + zipOut.putNextEntry(zipEntry); + byte[] bytes = new byte[1024]; + int length; + while ((length = fis.read(bytes)) >= 0) { + zipOut.write(bytes, 0, length); + } + fis.close(); } - fis.close(); - } -} \ No newline at end of file + }} \ No newline at end of file