From d4739d17edd516ccdda49f0c77f5df6cc7b61352 Mon Sep 17 00:00:00 2001 From: Gravit Date: Tue, 21 May 2019 03:05:08 +0700 Subject: [PATCH] =?UTF-8?q?[FIX]=20=D0=9E=D0=BF=D1=82=D0=B8=D0=BC=D0=B8?= =?UTF-8?q?=D0=B7=D0=B0=D1=86=D0=B8=D1=8F=20=D0=BF=D1=80=D0=BE=D0=B8=D0=B7?= =?UTF-8?q?=D0=B2=D0=BE=D0=B4=D0=B8=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D0=BE?= =?UTF-8?q?=D1=81=D1=82=D0=B8=20=D0=BF=D0=BE=D0=B8=D1=81=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BC=D0=BE=D0=B4=D0=BE=D0=B2=20=D0=B2=20=D0=B4=D1=80=D1=83?= =?UTF-8?q?=D0=B3=D0=B8=D1=85=20=D0=BA=D0=BB=D0=B8=D0=B5=D0=BD=D1=82=D0=B0?= =?UTF-8?q?=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ru/gravit/launcher/client/LauncherUpdateController.java | 6 +++--- .../src/main/java/ru/gravit/utils/helper/LogHelper.java | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Launcher/src/main/java/ru/gravit/launcher/client/LauncherUpdateController.java b/Launcher/src/main/java/ru/gravit/launcher/client/LauncherUpdateController.java index b3f20052..c85be081 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/client/LauncherUpdateController.java +++ b/Launcher/src/main/java/ru/gravit/launcher/client/LauncherUpdateController.java @@ -76,7 +76,7 @@ public void postDiff(UpdateRequest request, UpdateRequestEvent e, HashedDir.Diff { //Еще раз проверим корректность хеша //Возможно эта проверка избыточна - if(file.isSame(ret, true)) + //if(file.isSame(ret, true)) { Path source = request.getDir().resolve(path); LogHelper.debug("Copy file %s to %s", ret.toAbsolutePath().toString(), source.toAbsolutePath().toString()); @@ -101,12 +101,12 @@ public Path tryFind(NewLauncherSettings.HashedStoreEntry en, HashedFile file) th HashedFile tfile = (HashedFile) entry; if(tfile.isSame(file)) { - LogHelper.debug("[DIR:%s] Found file %s in %s", en.name, name, path); + LogHelper.dev("[DIR:%s] Found file %s in %s", en.name, name, path); Path tdir = Paths.get(en.fullPath).resolve(path); try { if(tfile.isSame(tdir, true)) { - LogHelper.debug("[DIR:%s] Confirmed file %s in %s", en.name, name, path); + LogHelper.dev("[DIR:%s] Confirmed file %s in %s", en.name, name, path); ret.set(tdir); return HashedDir.WalkAction.STOP; } diff --git a/libLauncher/src/main/java/ru/gravit/utils/helper/LogHelper.java b/libLauncher/src/main/java/ru/gravit/utils/helper/LogHelper.java index 3d75e87c..22c1649a 100644 --- a/libLauncher/src/main/java/ru/gravit/utils/helper/LogHelper.java +++ b/libLauncher/src/main/java/ru/gravit/utils/helper/LogHelper.java @@ -113,7 +113,10 @@ public static void debug(String format, Object... args) { @LauncherAPI public static void dev(String format, Object... args) { - dev(String.format(format, args)); + if(isDevEnabled()) + { + dev(String.format(format, args)); + } } @LauncherAPI