Skip to content

Make sure that *.* always means all files in FileMatcher#6235

Merged
ladipro merged 1 commit intodotnet:masterfrom
ladipro:dont-filter-out-star-dot-star
Mar 10, 2021
Merged

Make sure that *.* always means all files in FileMatcher#6235
ladipro merged 1 commit intodotnet:masterfrom
ladipro:dont-filter-out-star-dot-star

Conversation

@ladipro
Copy link
Copy Markdown
Member

@ladipro ladipro commented Mar 9, 2021

Context

#6151 introduced a regression where FileMatcher takes the pattern *.* too literally and returns only files that have a dot in the name. *.* should be special cased to mean all files in the directory, with or without an extension.

Changes Made

Fixed the regression by explicitly testing for *.* and added test coverage.

Testing

Existing and modified unit tests, repro project from dotnet/sdk#16185 (comment).

Notes

Testing for both * and *.* is already happening elsewhere in the class. MSBuild calls Directory.EnumerateFileSystemEntries which under the covers uses MatchType.Win32 and causes this behavior of unifying *.* with * on all platforms.

@benvillalobos
Copy link
Copy Markdown
Member

(copy/pasting my comment from teams here)
For the same reason as #6234 (review) we should have a test that explicitly covers this scenario

@ladipro
Copy link
Copy Markdown
Member Author

ladipro commented Mar 9, 2021

This PR includes test changes that cover the scenario. I.e. the updated tests would fail if the regression is re-introduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants