Fix custom map loading from relative Engine.SupportDir paths.

This commit is contained in:
Paul Chote
2025-11-02 14:56:35 +00:00
committed by Gustas Kažukauskas
parent a20ab8a33a
commit 6743904372

View File

@@ -221,6 +221,9 @@ namespace OpenRA
if (!Directory.Exists(path))
throw new DirectoryNotFoundException(path);
// Ensure that userSupportPath is an absolute path
path = Path.GetFullPath(path);
if (!path.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal) &&
!path.EndsWith(Path.AltDirectorySeparatorChar.ToString(), StringComparison.Ordinal))
path += Path.DirectorySeparatorChar;