This commit is contained in:
huanghongxun
2019-11-08 11:17:46 +08:00
parent 869f57cbf1
commit f133fcf66c

View File

@@ -287,7 +287,8 @@ public class DefaultLauncher extends Launcher {
Process process; Process process;
try { try {
ProcessBuilder builder = new ProcessBuilder(rawCommandLine).directory(runDirectory); ProcessBuilder builder = new ProcessBuilder(rawCommandLine).directory(runDirectory);
builder.environment().put("APPDATA", options.getGameDir().getAbsoluteFile().getParent()); String appdata = options.getGameDir().getAbsoluteFile().getParent();
if (appdata != null) builder.environment().put("APPDATA", appdata);
process = builder.start(); process = builder.start();
} catch (IOException e) { } catch (IOException e) {
throw new ProcessCreationException(e); throw new ProcessCreationException(e);