From 4ed687087fc3ba42d019fa76264ab422939703f2 Mon Sep 17 00:00:00 2001 From: Gravit'a <12893402+gravit0@users.noreply.github.com> Date: Sat, 15 Apr 2023 13:51:33 +0700 Subject: [PATCH] [FIX] LauncherGuard default config --- .../main/java/pro/gravit/launcher/client/DirBridge.java | 7 +------ .../src/main/java/pro/gravit/launcher/Launcher.java | 5 +++++ modules | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) 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 b26ccd3f..348815e5 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/DirBridge.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/DirBridge.java @@ -113,7 +113,7 @@ public static Path getGuardDir() { } public static Path getGuardDir(JVMHelper.ARCH arch, JVMHelper.OS os) { - Path dir = getGuardDir().resolve(makeSpecialGuardDirName(arch, os)); + Path dir = getGuardDir().resolve(Launcher.makeSpecialGuardDirName(arch, os)); try { IOHelper.createParentDirs(dir); } catch (Throwable e) { @@ -123,11 +123,6 @@ public static Path getGuardDir(JVMHelper.ARCH arch, JVMHelper.OS os) { } - - public static String makeSpecialGuardDirName(JVMHelper.ARCH arch, JVMHelper.OS os) { - return String.format("%s-%s", arch.name, os.name); - } - public static Path getLegacyLauncherDir(String projectname) { return IOHelper.HOME_DIR.resolve(projectname); } diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/Launcher.java b/LauncherAPI/src/main/java/pro/gravit/launcher/Launcher.java index e9471df0..28bb2374 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/Launcher.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/Launcher.java @@ -4,6 +4,7 @@ import pro.gravit.launcher.profiles.ClientProfile; import pro.gravit.launcher.serialize.HInput; import pro.gravit.utils.helper.IOHelper; +import pro.gravit.utils.helper.JVMHelper; import pro.gravit.utils.helper.LogHelper; import pro.gravit.utils.helper.SecurityHelper; @@ -122,4 +123,8 @@ public static void applyLauncherEnv(LauncherConfig.LauncherEnvironment env) { break; } } + + public static String makeSpecialGuardDirName(JVMHelper.ARCH arch, JVMHelper.OS os) { + return String.format("%s-%s", arch.name, os.name); + } } diff --git a/modules b/modules index 9be16b2b..29ee5c6d 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 9be16b2bc7047659577f976b5f95a71469d8a735 +Subproject commit 29ee5c6d804282bac17d526a185a41ee40ddd1da