You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
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:
@@ -61,10 +61,9 @@ 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(includedFiles.Where(includedFile => glob.IsMatch(includedFile)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user