summaryrefslogtreecommitdiff
path: root/modules/mono
diff options
context:
space:
mode:
authorRaul Santos <raulsntos@gmail.com>2022-08-08 01:41:30 +0200
committerRaul Santos <raulsntos@gmail.com>2022-08-08 02:00:17 +0200
commit34c3966510a1ee204bc9e1579de6d1b43ea51076 (patch)
tree5c7cd336aad05c96b8c6e661bdfc05d276dc22d5 /modules/mono
parent836fe9adcd94e68c30d6042d1ce5bfabde6b3473 (diff)
Avoid paths with invalid characters in `IsRider`
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs b/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs
index ac29efb716..3440eb701c 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs
+++ b/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);