mojira.dev
MCL-5385

'Game directory is invalid or inaccessible' when a junction is used or an appdata environment path is used

'Game directory is invalid or inaccessible' when a junction is used or an appdata environment path is used

When using an %AppData%\.minecraft junction via mklink to store the files elsewhere the new launcher throws an error and fails to launch the game or download files correctly.

Re-created the issue on a VM this way:
Moved the .minecraft from appdata into a folder on the desktop where I had added minecraft for this test
ran cmd and then
mklink /j C:\Users\Administrator\AppData\Roaming\.minecra
ft C:\Users\Administrator\Desktop\AppData\.minecraft

Started the launcher and when attempting to download new files or launch an instance of the game itself it shows this error instead:

The game directory is invalid or inaccessible.
Error details: The system cannot find the file specified
Filename on disk: .minecraft
Path: C:\Users\Administrator\AppData\Roaming\.minecraft
Exists: directory

In past versions of the launcher I've used symbolic links with no issues to keep that directory on a hdd rather than the os ssd.

Alternatively using a bat file to change the appdata path used to work and instead it now shows the same behavior/error as the junction

Eg..
set APPDATA=%CD%\data
"%CD%\bin\Minecraft.exe"

Oddly I'm not seeing any issues or failed operations via procmon, it finds the paths just fine!

Linked issues

Attachments

Comments 1

migrated

(Unassigned)

Unconfirmed

Retrieved