File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/Microsoft.ComponentDetection.Common Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -78,11 +78,11 @@ public bool IsRunningOnWindowsContainer
7878
7979 public static bool MatchesPattern ( string searchPattern , ref FileSystemEntry fse )
8080 {
81- if ( searchPattern . StartsWith ( "*" ) && fse . FileName . EndsWith ( searchPattern [ 1 ..] , StringComparison . OrdinalIgnoreCase ) )
81+ if ( searchPattern . StartsWith ( "*" ) && fse . FileName . EndsWith ( searchPattern . AsSpan ( ) [ 1 ..] , StringComparison . OrdinalIgnoreCase ) )
8282 {
8383 return true ;
8484 }
85- else if ( searchPattern . EndsWith ( "*" ) && fse . FileName . StartsWith ( searchPattern [ ..^ 1 ] , StringComparison . OrdinalIgnoreCase ) )
85+ else if ( searchPattern . EndsWith ( "*" ) && fse . FileName . StartsWith ( searchPattern . AsSpan ( ) [ ..^ 1 ] , StringComparison . OrdinalIgnoreCase ) )
8686 {
8787 return true ;
8888 }
You can’t perform that action at this time.
0 commit comments