mojira.dev
MCL-12884

Native launcher does not set current working directory correctly when launching the game

When the launcher starts actual client, the working directory of launched client is not the client's profile directory, but the directory of the launcher.

This messing up all logs, settings and saves.

 

See MCL-11268 for more details.

Linked issues

Attachments

Comments 17

Cannot reproduce.

I created a new profile and set the GAME DIRECTORY to an arbitrary path (e.g. C:\ProfileDir). Then I launched the profile and found all the files (logs, resourcepacks, saves, options.txt, realms_persistence.json, and usercache.json) are not in the launcher installation path nor the default .minecraft path, but the said path.

I was using 2.1.10581 (Beta), could you try upgrading to the Beta version to see if this is resolved?

I can't find the downloads for that version anywhere.
Mind explain the "upgrading" moment?

In the launcher Settings, select "Use beta version of the Launcher", and then restart the launcher. It should update automatically.

Did that, but nothing changed.
Files still created in the launcher directory.
On top of that, launcher is unable to find the bundled Java runtime.

[media]

While
C:\Games\Minecraft> type runtime\jre-x64\.version
1.8.0_51

Launcher version 2.1.10837

Tried it on a different machine and it worked there. The only difference with my system is that C:\Games is a volume mount point. The question is, what are you doing that break over volume borders?

If you need help reproducing or testing the issue, please tell me.

7 more comments

Even more laughable, the first error you would get is 'Unable to locate the Java runtime.'
Which is located exactly where it should. But you'll have to manually install runtime somewhere else to let the game run.

Considering how long the bug has not been updated, is this still an issue in 2.3.645 (New Windows App)? Does this also occur on BETA version of the Launcher?

This ticket will automatically reopen when you reply.

Test it yourself. Use a Windows VM, follow the steps outlined. You don't need to start the game proper, a crash would be indicative enough, since logs and game directories would be created already.

Hi! Looking at the repo steps from your comment, I would say that the issue seems plausible as the launcher should not assume that everyone is using C: as the main drive. 

It is however possible that you are the only one experiencing this, so it would be great if you could provide simplified repro steps (that the average user can follow).

The problem is that my setup do not use any drive letter at all for the partition in question.
This is done specifically for a better portability of the setup - I could move my Games directory and its sub-directories anywhere at will (f.e. where I have more free space) and still keep everything running from the same central point without an issue. As long as that "everything" is not trying to "play smart" and pretend it "knows better" how the things should be done at the filesystem level.
Also a lot of drive letters flashing in file manager (I have 4 only physical disks installed, plus what-do-I-know about cardreaders and rogue removables) by itself is not healthy in my opinion.

AnrDaemon

(Unassigned)

Plausible

Retrieved