1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

[3.2] Handle csproj "Remove" globs

MSBuild Item returns empty strings if an attribute isn't set (which
 caused an IndexOutOfRangeException in NormalizePath).

 We were treating Excludes incorrectly, Remove directives provide the
 intended behaviour in the auto-including csproj format.
This commit is contained in:
Alex de la Mare
2020-09-05 21:29:04 +10:00
parent 41b9e1d7ea
commit 6474e036ac
2 changed files with 6 additions and 2 deletions

View File

@@ -188,9 +188,10 @@ namespace GodotTools.ProjectEditor
if (item.ItemType != itemType)
continue;
string normalizedExclude = item.Exclude.NormalizePath();
var glob = MSBuildGlob.Parse(normalizedExclude);
string normalizedRemove= item.Remove.NormalizePath();
var glob = MSBuildGlob.Parse(normalizedRemove);
excluded.AddRange(result.Where(includedFile => glob.IsMatch(includedFile)));
}