Previously, starting a packaged server with a --data-dir containing a trailing slash worked. Now, this causes maps to fail to load:
System.InvalidOperationException: This branch should never be reached. Path: /Maps/Test/dev_map.yml
at Robust.Shared.ContentPack.PathHelpers.SafeGetResourcePath(String baseDir, ResPath path) in RobustToolbox/Robust.Shared/ContentPack/PathHelpers.cs:line 88
Steps to Reproduce
- Check out space-station-14 fb22cefd8 and update engine submodule.
dotnet build
- Compare running
./bin/Content.Server/Content.Server --data-dir /tmp with ./bin/Content.Server/Content.Server --data-dir /tmp/
You can also run Content.Packaging, get a ZIP, extract, and run Robust.Server with --data-dir. Because this doesn't load a map immediately, there is a latent fault when you try to start round and map loading fails.
Workaround
Don't pass directories with trailing slashes to --data-dir.