From 34c3966510a1ee204bc9e1579de6d1b43ea51076 Mon Sep 17 00:00:00 2001 From: Raul Santos Date: Mon, 8 Aug 2022 01:41:30 +0200 Subject: Avoid paths with invalid characters in `IsRider` --- .../mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/mono') 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); -- cgit v1.2.3