ソースを参照

Merge pull request #41800 from alexdlm/fix-csproj-read-3.2

 [3.2] Handle csproj "Remove" globs
Rémi Verschelde 5 年 前
コミット
13e2e487a2

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

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

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