Skip to content

Commit

Permalink
Makefile: fix unzip() function
Browse files Browse the repository at this point in the history
  • Loading branch information
bertfrees committed Dec 1, 2022
1 parent ad204f1 commit 063a894
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file modified make/java/lib/util.class
Binary file not shown.
2 changes: 1 addition & 1 deletion make/java/lib/util.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ public static void write(File file, String string) throws IOException {
}

public static void unzip(File zipFile, File directory) throws IOException {
directory.mkdirs();
try (ZipInputStream zip = new ZipInputStream(new FileInputStream(zipFile))) {
ZipEntry entry;
while ((entry = zip.getNextEntry()) != null) {
File destFile = new File(directory, entry.getName());
if (!entry.isDirectory()) {
destFile.getParentFile().mkdirs();
try (BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(destFile))) {
byte[] bytes = new byte[1024];
int read = 0;
Expand Down

0 comments on commit 063a894

Please sign in to comment.