Skip to content

Use Contains in FileSystemName.MatchPattern#123900

Merged
stephentoub merged 1 commit intodotnet:mainfrom
stephentoub:matchpatterncontains
Feb 3, 2026
Merged

Use Contains in FileSystemName.MatchPattern#123900
stephentoub merged 1 commit intodotnet:mainfrom
stephentoub:matchpatterncontains

Conversation

@stephentoub
Copy link
Member

No description provided.

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the FileSystemName.MatchPattern method to use the built-in Contains method instead of a manual loop when checking for additional periods in a filename during DOS_STAR wildcard matching.

Changes:

  • Replaced a manual for-loop with ReadOnlySpan<char>.Contains('.') for better code clarity and maintainability

@stephentoub stephentoub enabled auto-merge (squash) February 2, 2026 18:29
@stephentoub
Copy link
Member Author

/ba-g mono timeouts

@stephentoub stephentoub merged commit 7eebb4f into dotnet:main Feb 3, 2026
148 of 156 checks passed
@stephentoub stephentoub deleted the matchpatterncontains branch February 3, 2026 02:32
lewing pushed a commit to lewing/runtime that referenced this pull request Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants