From a5be152b873119d8de3ad175ecb095dbd75a41cc Mon Sep 17 00:00:00 2001 From: harvastum Date: Wed, 18 May 2022 16:28:35 +0200 Subject: [PATCH] [PTRun][VSCode]case insensitive binary detection (#18308) * make instance finding case insensitive * remove trailing whitespace --- .../VSCodeHelper/VSCodeInstances.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/VSCodeHelper/VSCodeInstances.cs b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/VSCodeHelper/VSCodeInstances.cs index d052a86476..21518700b8 100644 --- a/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/VSCodeHelper/VSCodeInstances.cs +++ b/src/modules/launcher/Plugins/Community.PowerToys.Run.Plugin.VSCodeWorkspaces/VSCodeHelper/VSCodeInstances.cs @@ -84,7 +84,10 @@ namespace Community.PowerToys.Run.Plugin.VSCodeWorkspaces.VSCodeHelper { var files = Directory.GetFiles(path); var iconPath = Path.GetDirectoryName(path); - files = files.Where(x => (x.Contains("code") || x.Contains("VSCodium")) && !x.EndsWith(".cmd", StringComparison.OrdinalIgnoreCase)).ToArray(); + files = files.Where(x => + (x.Contains("code", StringComparison.OrdinalIgnoreCase) || + x.Contains("VSCodium", StringComparison.OrdinalIgnoreCase)) + && !x.EndsWith(".cmd", StringComparison.OrdinalIgnoreCase)).ToArray(); if (files.Length > 0) {