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