mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Matching ExactName for known Win32 Programs (#6924)
* Matching explorer.exe also for explorer Added unit test Optimized multiple iterations for IProgram * Fixed linter Co-authored-by: p-storm <paul.de.man@gmail.com>
This commit is contained in:
@@ -20,5 +20,7 @@ namespace Microsoft.Plugin.Program.Programs
|
||||
string Description { get; set; }
|
||||
|
||||
string Location { get; }
|
||||
|
||||
bool Enabled { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,10 +170,12 @@ namespace Microsoft.Plugin.Program.Programs
|
||||
|
||||
public bool QueryEqualsNameForRunCommands(string query)
|
||||
{
|
||||
if (query != null && AppType == ApplicationType.RunCommand
|
||||
&& !query.Equals(Name, StringComparison.OrdinalIgnoreCase))
|
||||
if (query != null && AppType == ApplicationType.RunCommand)
|
||||
{
|
||||
return false;
|
||||
if (!query.Equals(Name, StringComparison.OrdinalIgnoreCase) && !query.Equals(ExecutableName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user