Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Mar 10, 2021

Conversation

ladipro
Copy link
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
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
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.

None yet

3 participants