From 8f426262c8af9e07ca62858f0c40321d88e56a01 Mon Sep 17 00:00:00 2001 From: Raul Santos Date: Mon, 8 Aug 2022 01:41:30 +0200 Subject: [PATCH] Avoid paths with invalid characters in `IsRider` (cherry picked from commit 34c3966510a1ee204bc9e1579de6d1b43ea51076) --- .../GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs b/modules/mono/editor/GodotTools/GodotTools/Ides/Rider/RiderPathManager.cs index ac29efb716e..7ff1afdfbf6 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(System.IO.Path.GetInvalidPathChars()) != -1) + return false; + var fileInfo = new FileInfo(path); string filename = fileInfo.Name.ToLowerInvariant(); return filename.StartsWith("rider", StringComparison.Ordinal);