From 063a894a0aee14dc5296c50d091e0077498b43c6 Mon Sep 17 00:00:00 2001 From: Bert Frees Date: Thu, 1 Dec 2022 18:25:58 +0100 Subject: [PATCH] Makefile: fix unzip() function --- make/java/lib/util.class | Bin 9536 -> 9585 bytes make/java/lib/util.java | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/make/java/lib/util.class b/make/java/lib/util.class index f7691bc184b1f87f342c015d48b5ad10bf60ad34..f1ee9fa28d2271fb38a2861333ace21084936d83 100644 GIT binary patch delta 4226 zcmb7Hd3;pW75>g__syFZ2}8C?2qX{|XR=U*00XiJ1_Tn85JLo%5CQ~4f+1mX8&tyL zE>BcM4I&a3L?Ajz3=-U;V$p8arM6b9Ev~J$wtzr-&YMKW;y=yrH|O1ZmhUY0-1A-z zPx*FA=*XGp4*?iTZ|b-aN8NY}Z|nFKey#KBH#*iu$Zs|LPB`!AD8lbGyerT5+_(wv zYxqE(e^B^P!yk3@z@LPCB+Nf+_*kBwDEvj?Qyqyos^K$v{#D4|LOK#ee;tmA(dV-I zLRMc2`AW#wLcUS>yN-Y0TOAqrPT`+A2H{^izQ@0H{0GN{oKQHaBNIOe`-CW*(r{V= zJtN{yMbL=YA=wn!6*+Va4+%&vzGFg8om`~Y8)>|gJ(mpO zolq2`BahA#(!))$)KgYoA-#me=@d^1TvAHp;!=|Ed>%@s6c6>LP^yReP+uWwiqb{c zPlWx2WGEV-qXb8#NJkY7R5VD?2J4tFAS2V+%WP6&@&F^iaX{LFBJ_Bv)#GHc?Dr)x2T8tr7O|A%k@dx&>PH@-NR#av$D_vD;pdK3(EikB*7Ah(;uo<@)xD~evxt*Y@S7uk0E-yD| z5neN>oE9^0bw$;p>eVX^T0%<=s-R`uW6Mj+(yCXctug2-*&BkMQ&FA69?fr+FS#D~ z7*t8i4XP5kv$CS9j+LuvnVF$Y3#_244XUBV225;a!iu<;SF}=0YK7F%DuY(ja&xuOij)fU#)l$SC_J+|^W7<4UN$0uRnQM%rs8?b@U%QC7g z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Ky+u8B~zxik4Qq>zSB=FJ$z!4eW|& zC|*=}>7;z0)}A982RIrn9QtT|)N)kBFfQtAIU2JI0)<%z@|}5Fyq3BHNm=pQfRHQb zcQv8Rf#N!i>f62yHeyaJHheO{&VTq_{>C3d54^`8ibMR0c;9XZiEzjV$z_M^6{Zre zV@U3B#iBWSmBYm^w3t;ta8=1|*wTpW_QKqW^R{mmIA(@vB%x59bU@w93*Ou{464f=#&D!KJs1 z>uRt>ZAb%_H{lk!yQkztpOHt9f^UDRk!|=j%Xy124sP^!@aW^&ZTtzieT1Jn@&Bi5 HG|&G4RJ(01 diff --git a/make/java/lib/util.java b/make/java/lib/util.java index 0063edc5..77fa3523 100644 --- a/make/java/lib/util.java +++ b/make/java/lib/util.java @@ -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;