mojira.dev
MCL-8824

Launcher gives 'game directory invalid' if path contains a Junction

Today I returned to Minecraft after a long break and upgraded to the latest launcher version. On trying to launch the game, I got this error:
The game directory is invalid or inaccessible.
Error details: The system cannot find the file specified
Filename on disk: .minecraft
Path: C:\Users\Tim\AppData\Roaming\.minecraft
Exists: directory

On my system, "C:\Users\Tim\AppData\Roaming" is a directory junction to "D:\Data\Tim\winhome\AppData\Roaming". This previously worked fine with no issues under the old launcher; I have made no changes except to update the launcher to the latest version.

As a workaround, modifying the game directory under 'launch options' and setting it to the actual location (D:\Data\Tim\winhome\AppData\Roaming\.minecraft) makes the launcher work correctly.

To reproduce:

  • Go to an administrator command prompt in a scratch space on the filesystem.

  • > mkdir mctest-realdir

  • > mklink /J mctest-junct mctest-realdir

  • Set game directory to "mctest-realdir" and verify that it launches

  • Set game directory to "mctest-junct" and observe error message

Linked issues

Comments 4

Thank you for your report!
However, this issue is a Duplicate of MCL-5294.

It has been linked to this report. If you have additional information, please add it to that report.
Please search before reporting, as it's likely that one exists already.

Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki

It's not actually a duplicate, since that issue was about environment variable %APPDATA% no longer being supported. (It's more of a duplicate for https://bugs.mojang.com/browse/MCL-5528, which I didn't find because they had a hardlink intsead of a junction, which I didn't search for.)

But I don't really care, since I have a workaround for it.

Yeah, it's technically not a duplicate, but we've been lumping both issues together since the workaround is the same.

If I recall correctly, the actual issue with junctions is in the boost library, which is somewhat annoying.

Thanks, I was interested in why it became an issue and why it couldn't (practically) be fixed. Libraries that break things like that is definitely annoying. (For reference... I have my entire AppData/* directory junctioned to another drive, and literally no other program has a problem with that. Boo boost.)

Anyway, --workdir or setting "Game Directory" workarounds are good enough.

migrated

(Unassigned)

Unconfirmed

directory, launcher-bug, windows-7

Retrieved