diff options
author | Raul Santos <raulsntos@gmail.com> | 2022-08-08 01:41:30 +0200 |
---|---|---|
committer | Raul Santos <raulsntos@gmail.com> | 2022-08-08 02:00:17 +0200 |
commit | 34c3966510a1ee204bc9e1579de6d1b43ea51076 (patch) | |
tree | 5c7cd336aad05c96b8c6e661bdfc05d276dc22d5 /modules/mono | |
parent | 836fe9adcd94e68c30d6042d1ce5bfabde6b3473 (diff) |
Avoid paths with invalid characters in `IsRider`
Diffstat (limited to 'modules/mono')
-rw-r--r-- | modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs | 3 |
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); |