diff --git a/OpenRA.Game/Platform.cs b/OpenRA.Game/Platform.cs index cfaf474522..cbe153676e 100644 --- a/OpenRA.Game/Platform.cs +++ b/OpenRA.Game/Platform.cs @@ -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;