Avoid paths with invalid characters in IsRider

This commit is contained in:
Raul Santos 2022-08-08 01:41:30 +02:00
parent 836fe9adcd
commit 34c3966510
No known key found for this signature in database
GPG key ID: B532473AE3A803E4

View file

@ -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);