[FIX] LauncherGuard default config

This commit is contained in:
Gravit'a 2023-04-15 13:51:33 +07:00
parent 95da394a5d
commit 4ed687087f
3 changed files with 7 additions and 7 deletions

View file

@ -113,7 +113,7 @@ public static Path getGuardDir() {
} }
public static Path getGuardDir(JVMHelper.ARCH arch, JVMHelper.OS os) { 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 { try {
IOHelper.createParentDirs(dir); IOHelper.createParentDirs(dir);
} catch (Throwable e) { } 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) { public static Path getLegacyLauncherDir(String projectname) {
return IOHelper.HOME_DIR.resolve(projectname); return IOHelper.HOME_DIR.resolve(projectname);
} }

View file

@ -4,6 +4,7 @@
import pro.gravit.launcher.profiles.ClientProfile; import pro.gravit.launcher.profiles.ClientProfile;
import pro.gravit.launcher.serialize.HInput; import pro.gravit.launcher.serialize.HInput;
import pro.gravit.utils.helper.IOHelper; import pro.gravit.utils.helper.IOHelper;
import pro.gravit.utils.helper.JVMHelper;
import pro.gravit.utils.helper.LogHelper; import pro.gravit.utils.helper.LogHelper;
import pro.gravit.utils.helper.SecurityHelper; import pro.gravit.utils.helper.SecurityHelper;
@ -122,4 +123,8 @@ public static void applyLauncherEnv(LauncherConfig.LauncherEnvironment env) {
break; break;
} }
} }
public static String makeSpecialGuardDirName(JVMHelper.ARCH arch, JVMHelper.OS os) {
return String.format("%s-%s", arch.name, os.name);
}
} }

@ -1 +1 @@
Subproject commit 9be16b2bc7047659577f976b5f95a71469d8a735 Subproject commit 29ee5c6d804282bac17d526a185a41ee40ddd1da