From 87cbee437b6aa36d6b087e2bcb53291d23a6060d Mon Sep 17 00:00:00 2001 From: Volker Berlin Date: Sun, 7 Jun 2020 12:55:40 +0200 Subject: [PATCH] ArchiveInputStream seems not compatible with Files.copy() --- test/de/inetsoftware/jwebassembly/SpiderMonkey.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/de/inetsoftware/jwebassembly/SpiderMonkey.java b/test/de/inetsoftware/jwebassembly/SpiderMonkey.java index 56500e2..c876c13 100644 --- a/test/de/inetsoftware/jwebassembly/SpiderMonkey.java +++ b/test/de/inetsoftware/jwebassembly/SpiderMonkey.java @@ -15,6 +15,7 @@ */ package de.inetsoftware.jwebassembly; +import java.io.BufferedInputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; @@ -133,7 +134,7 @@ public class SpiderMonkey { File file = new File( target, entry.getName() ); file.getParentFile().mkdirs(); - Files.copy( archiv, file.toPath(), StandardCopyOption.REPLACE_EXISTING ); + Files.copy( new BufferedInputStream( archiv, 0x8000 ), file.toPath(), StandardCopyOption.REPLACE_EXISTING ); file.setLastModified( entry.getLastModifiedDate().getTime() ); file.setExecutable( true ); } while( true );