[ModAPI] Write to world storage can write to game folder

Digi shared this bug 3 days ago
Reported

Mod scripts can write files to world's Storage folder, but if the world is created with a mod that does this it will write to game's CustomWorlds folder until the first update of the game.


STR:

1. Download the attached mod and extract in %appdata%/SpaceEngineers/Mods/

2. In-game go to new game -> sandbox -> Empty World, then click Mods and add the downloaded local mod.

3. Create the world and wait for it to spawn you in.

4. Open <game install folder>\Content\CustomWorlds\Empty World and notice the new Storage folder, if you explore inside you'll find that the mod wrote some files there.


The SE log will also have logged 12 messages all prefixed with "### BugTest world path in", two being for LoadData() and BeforeStart(), which show the path that the game thinks this world is in, and it's still in the game folder which is why that world storage writing thing writes there.

This path being set so late could have other consequences too, please fix the Session.CurrentPath that it's set to the proper save location before any LoadData() is triggered.

Replies (1)

photo
2

Hello, Engineer!


Thank you for the comprehensive overview of the issue.

We've added your report it to our internal system.

We will update this thread when we have more information.


Kind Regards

Keen Software House

Leave a Comment
 
Attach a file
Access denied