1
0
mirror of https://github.com/SKCraft/Launcher.git synced 2024-11-27 12:46:22 +01:00

Use absolute paths for legacy launcher wrapper support (#335)

This commit is contained in:
Henry 2020-12-24 18:58:03 +00:00 committed by GitHub
commit 495d94370c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,7 +91,7 @@ public final class Launcher {
public Launcher(@NonNull File baseDir, @NonNull File configDir) throws IOException {
SharedLocale.loadBundle("com.skcraft.launcher.lang.Launcher", Locale.getDefault());
this.baseDir = baseDir;
this.baseDir = baseDir.getAbsoluteFile();
this.properties = LauncherUtils.loadProperties(Launcher.class, "launcher.properties", "com.skcraft.launcher.propertiesFile");
this.instances = new InstanceList(this);
this.assets = new AssetsRoot(new File(baseDir, "assets"));
@ -413,7 +413,7 @@ public final class Launcher {
if (dir != null) {
log.info("Using given base directory " + dir.getAbsolutePath());
} else {
dir = new File(".");
dir = new File("");
log.info("Using current directory " + dir.getAbsolutePath());
}