From a700ec4ca7add4a63103499ca9055c7d9b182250 Mon Sep 17 00:00:00 2001 From: Gravita Date: Sat, 29 May 2021 05:23:29 +0700 Subject: [PATCH] [FIX] encrypted runtime (ZipException: duplicate) --- .../gravit/launchserver/binary/BuildContext.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BuildContext.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BuildContext.java index ad85e66b..69b042ab 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BuildContext.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/BuildContext.java @@ -1,5 +1,7 @@ package pro.gravit.launchserver.binary; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import pro.gravit.launcher.Launcher; import pro.gravit.launcher.serialize.HOutput; import pro.gravit.launcher.serialize.stream.StreamObject; @@ -31,6 +33,7 @@ import java.util.function.Predicate; import java.util.jar.JarFile; import java.util.zip.ZipEntry; +import java.util.zip.ZipException; import java.util.zip.ZipInputStream; import java.util.zip.ZipOutputStream; @@ -197,6 +200,7 @@ private final static class EncryptedRuntimeDirVisitor extends SimpleFileVisitor< private final String targetDir; private final SecretKeySpec sKeySpec; private final IvParameterSpec iKeySpec; + private final transient Logger logger = LogManager.getLogger(); private EncryptedRuntimeDirVisitor(ZipOutputStream output, String aesKey, Map hashs, Path sourceDir, String targetDir) { this.output = output; @@ -217,11 +221,15 @@ private EncryptedRuntimeDirVisitor(ZipOutputStream output, String aesKey, Map