Skip to content

Commit a6e4651

Browse files
authored
[release/3.6] 修复非 Windows 平台上游戏进程的 user.home 可能被设置为 null 的问题 (#4427)
#4241
1 parent 554e573 commit a6e4651

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

HMCLCore/src/main/java/org/jackhuang/hmcl/launch/DefaultLauncher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ private Command generateCommandLine(File nativeFolder) throws IOException {
169169
}
170170

171171
if (OperatingSystem.CURRENT_OS != OperatingSystem.WINDOWS)
172-
res.addDefault("-Duser.home=", options.getGameDir().getParent());
172+
res.addDefault("-Duser.home=", options.getGameDir().getAbsoluteFile().getParent());
173173

174174
Proxy.Type proxyType = options.getProxyType();
175175
if (proxyType == null) {

0 commit comments

Comments
 (0)