mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-08 19:35:36 -04:00
Fix the wrong AppData path
This commit is contained in:
parent
2b63d46ffd
commit
2434e069f5
@ -126,7 +126,7 @@ public class GameLauncher {
|
||||
provider.onLaunch();
|
||||
ProcessBuilder builder = new ProcessBuilder(str);
|
||||
builder.directory(provider.getRunDirectory(get.getSelectedMinecraftVersion().id))
|
||||
.environment().put("APPDATA", get.getCanonicalGameDirFile().getParent());
|
||||
.environment().put("APPDATA", get.getCanonicalGameDirFile().getPath());
|
||||
JavaProcess jp = new JavaProcess(str, builder.start(), PROCESS_MANAGER);
|
||||
launchEvent.execute(jp);
|
||||
} catch (IOException e) {
|
||||
@ -158,7 +158,7 @@ public class GameLauncher {
|
||||
if (isWin) {
|
||||
writer.write("@echo off");
|
||||
writer.newLine();
|
||||
String appdata = IOUtils.tryGetCanonicalFilePath(get.getCanonicalGameDirFile().getParentFile());
|
||||
String appdata = IOUtils.tryGetCanonicalFilePath(get.getCanonicalGameDirFile());
|
||||
if (appdata != null) {
|
||||
writer.write("set appdata=" + appdata);
|
||||
writer.newLine();
|
||||
|
Loading…
x
Reference in New Issue
Block a user