Merge pull request #41790 from alexdlm/fix-csproj-read
Handle csproj "Remove" globs
This commit is contained in:
commit
da588226a2
2 changed files with 5 additions and 3 deletions
|
@ -23,6 +23,9 @@ namespace GodotTools.Core
|
||||||
|
|
||||||
public static string NormalizePath(this string path)
|
public static string NormalizePath(this string path)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(path))
|
||||||
|
return path;
|
||||||
|
|
||||||
bool rooted = path.IsAbsolutePath();
|
bool rooted = path.IsAbsolutePath();
|
||||||
|
|
||||||
path = path.Replace('\\', '/');
|
path = path.Replace('\\', '/');
|
||||||
|
|
|
@ -61,10 +61,9 @@ namespace GodotTools.ProjectEditor
|
||||||
if (item.ItemType != itemType)
|
if (item.ItemType != itemType)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
string normalizedExclude = item.Exclude.NormalizePath();
|
string normalizedRemove = item.Remove.NormalizePath();
|
||||||
|
|
||||||
var glob = MSBuildGlob.Parse(normalizedExclude);
|
|
||||||
|
|
||||||
|
var glob = MSBuildGlob.Parse(normalizedRemove);
|
||||||
excluded.AddRange(includedFiles.Where(includedFile => glob.IsMatch(includedFile)));
|
excluded.AddRange(includedFiles.Where(includedFile => glob.IsMatch(includedFile)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue