This commit is contained in:
huanghongxun committed 2019-11-11 17:34:58 +08:00
1 parent 869f57cbf1
commit f133fcf66c
1 file changed
+2 -1
@@ -287,7 +287,8 @@ public class DefaultLauncher extends Launcher {
Process process;
try {
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();
} catch (IOException e) {
throw new ProcessCreationException(e);