Merge pull request #41800 from alexdlm/fix-csproj-read-3.2
[3.2] Handle csproj "Remove" globs
This commit is contained in:
commit
13e2e487a2
|
@ -23,6 +23,9 @@ namespace GodotTools.Core
|
|||
|
||||
public static string NormalizePath(this string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
return path;
|
||||
|
||||
bool rooted = path.IsAbsolutePath();
|
||||
|
||||
path = path.Replace('\\', '/');
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue