From 6077a51fd4cc0e1ab4f3bafb23465b323bc6df00 Mon Sep 17 00:00:00 2001 From: Zaxar163 Date: Tue, 14 Apr 2020 15:35:20 +0300 Subject: [PATCH] =?UTF-8?q?[ANY]=20=D0=92=D1=8B=D0=B2=D0=BE=D0=B4=D0=B8?= =?UTF-8?q?=D0=BC=20=D1=81=D1=82=D0=B5=D0=BA=D1=82=D1=80=D0=B5=D0=B9=D1=81?= =?UTF-8?q?,=20=D0=B5=D1=81=D0=BB=D0=B8=20DirBridge.move=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BB=D1=83=D1=87=D0=B8=D0=BB=20=D0=B0=D1=80=D0=B3=D1=83=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D1=82=D0=BE=D0=BC=20null.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../socket/response/update/LauncherResponse.java | 1 - .../main/java/pro/gravit/launcher/client/DirBridge.java | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java index ef7bc7b1..c018d78f 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/LauncherResponse.java @@ -60,7 +60,6 @@ private boolean checkSecure(String hash, String salt) { byte[] normal_hash = SecurityHelper.digest(SecurityHelper.DigestAlgorithm.SHA256, server.runtime.clientCheckSecret.concat(".").concat(salt)); byte[] launcher_hash = Base64.getDecoder().decode(hash); - //LogHelper.debug("[checkSecure] %s vs %s", Arrays.toString(normal_hash), Arrays.toString(launcher_hash)); return Arrays.equals(normal_hash, launcher_hash); } diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/DirBridge.java b/Launcher/src/main/java/pro/gravit/launcher/client/DirBridge.java index df35a076..b5b9bcb0 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/DirBridge.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/DirBridge.java @@ -46,6 +46,13 @@ public class DirBridge { } public static void move(Path newDir) throws IOException { + if (newDir == null) { + LogHelper.debug("Invalid dir (null)"); + if (LogHelper.isDevEnabled()) + LogHelper.dev(LogHelper.toString(new Throwable("Check stack of call DirBridge with null path..."))); + return; + } + LogHelper.dev(newDir.toString()); IOHelper.move(dirUpdates, newDir); dirUpdates = newDir; }