Fix resource loading on non-Windows platforms (#6201)

(cherry picked from commit 51bbc5dc45)
This commit is contained in:
Skye
2025-09-16 18:10:30 +09:00
committed by PJB3005
parent 0b9150dfc5
commit 75ecbd0777

View File

@@ -80,7 +80,7 @@ namespace Robust.Shared.ContentPack
if (!retPath.StartsWith(baseDir))
{
// Allow path to match if it's just missing the directory separator at the end.
if (retPath != baseDir.TrimEnd('\\'))
if (retPath != baseDir.TrimEnd(Path.DirectorySeparatorChar))
throw new InvalidOperationException($"This branch should never be reached. Path: {path}");
}