浏览代码

Avoid paths with invalid characters in `IsRider`

Raul Santos 3 年之前
父节点
当前提交
34c3966510
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs

+ 3 - 0
modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs

@@ -66,6 +66,9 @@ namespace GodotTools.Ides.Rider
             if (string.IsNullOrEmpty(path))
                 return false;
 
+            if (path.IndexOfAny(Path.GetInvalidPathChars()) != -1)
+                return false;
+
             var fileInfo = new FileInfo(path);
             string filename = fileInfo.Name.ToLowerInvariant();
             return filename.StartsWith("rider", StringComparison.Ordinal);