-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.The issue is fixed.WG-Interactive-HelpSystemhelp infrastructure and formatting of helphelp infrastructure and formatting of help
Description
In #3852 - the change treats the parameter like a wildcard, but uses a regex. Also, the fix repeatedly checks (inside the loop) if it's a pattern, that can be done once.
I would have expected a fix more like:
var wildcardPattern = WildcardPattern.ContainsWildcardCharacters(pattern)
? WildcardPatter.Get(pattern, WildcardOptions.IgnoreCase)
: null;
foreach (string filePath in files)
{
if (filePath.IndexOf(pattern, StringComparison.OrdinalIgnoreCase) >= 0)
{
result.Add(filePath);
break;
}
if (wildcardPattern.?IsMatch(pattern))
{
result.Add(filePath);
}
}Metadata
Metadata
Assignees
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.The issue is fixed.WG-Interactive-HelpSystemhelp infrastructure and formatting of helphelp infrastructure and formatting of help