Fixed yaml bug with leading spaces

This commit is contained in:
DeadlySurprise
2014-11-21 15:11:45 +01:00
parent 40c9d0a47d
commit fbe6ab7f4e
5 changed files with 88 additions and 15 deletions

View File

@@ -98,6 +98,8 @@ namespace OpenRA
/// <summary>Replace special character prefixes with full paths</summary>
public static string ResolvePath(string path)
{
path = path.TrimEnd(new char[] { ' ', '\t' });
// paths starting with ^ are relative to the support dir
if (path.StartsWith("^"))
path = SupportDir + path.Substring(1);