Bläddra i källkod

Merge pull request #41790 from alexdlm/fix-csproj-read

Handle csproj "Remove" globs
Rémi Verschelde 5 år sedan
förälder
incheckning
da588226a2

+ 3 - 0
modules/mono/editor/GodotTools/GodotTools.Core/StringExtensions.cs

@@ -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('\\', '/');

+ 2 - 3
modules/mono/editor/GodotTools/GodotTools.ProjectEditor/ProjectUtils.cs

@@ -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)));
             }