HMCL-dev / HMCL-dev/HMCL

[Bug] 在windows环境启动时会自动将游戏文件夹路径中的斜杠改为反斜杠

Open
#6,125 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
10.1k
Forks
934
Avg merge
1d 5h
Merged PRs (30d)
82

Description

问题描述 | Bug Description

在Linux环境中将hmcl.json的gameDir中的\\改为/,启动hmcl后没有异常
随后在Windows环境中启动hmcl,gameDir中的/被自动改为\\
回到Linux环境,由于路径中的/被改为\\导致无法正常识别游戏文件夹
(游戏文件夹均使用相对路径)

启动器崩溃报告 / 启动器日志文件 | Launcher Crash Report / Launcher Log File

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by sharing an hmcl.json with a relative gameDir between Linux and Windows, then trace the launcher startup path handling that value. The fix is done when launching on Windows does not make the relative path unusable when the file is returned to Linux, with both platforms still recognizing the game folder.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.