You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Glob **/ patterns match nothing since the #114 separator fix: src/**/*.cs and **/*.cs filter out every path #126
The fix for #114 (MaskPathSeparators, TextFilter/TextFilter.cs ~L406–428) replaces / and \ with U+E000 in both the pattern and the text before DotNet.Glob sees them. That lets * and ? cross slashes as intended, but it also removes DotNet.Glob's directory-wildcard handling of **, which only applies when ** sits between path separators. After masking, **/ is just ** followed by a literal private-use character, so it no longer means "zero or more path segments". Every pattern that uses the standard **/ form now matches nothing, including paths that fit it exactly.
IsMatch(..., Glob, ByWholeString) on HEAD returns false for ("src/a.cs","src/**/*.cs"), ("src/x/a.cs","src/**/*.cs"), ("src/a.cs","**/*.cs") and ("a.cs","**/*.cs"). All four returned true before the fix. Bare ** and src/** still match.
These results come from a console app that references TextFilter.csproj and was run against both commits. The test project has no test that uses **, so the regression went uncaught.
Why it matters
**/ is the most common way to write a recursive path glob. Anyone filtering file lists with it now gets an empty result and no error.
Suggested fix / acceptance criteria
Keep the #114 behaviour (*readme* matches docs/readme.md, AC* matches AC/DC) and make **/ mean "zero or more characters ending at a separator" again. Two ways to do it:
Rewrite ** followed by a separator before masking, so the masked glob covers both the no-directory case and the "anything, then a separator" case.
Translate the glob to a regex rather than relying on DotNet.Glob's separator semantics.
Tests to add:
src/**/*.cs matches src/a.cs and src/x/a.cs
**/*.cs matches a.cs and src/a.cs
**/readme.md matches docs/readme.md
GlobStarMatchesAcrossSlash, GlobFilterKeepsPathItems and GlobLiteralSlashInPatternStillMatchesSlashInText still pass
Activity
matt-edmondson commentedon Sep 28, 2026
Triage
*and?never match across/or\, so any item containing a slash is filtered out #114 fix. The most common recursive glob form (**/) now returns an empty result with no error, and no existing test covers**.TextFilterglob matching, specificallyMaskPathSeparatorsinTextFilter/TextFilter.cs.*and?never match across/or\, so any item containing a slash is filtered out #114, which is closed. No open PR in this repo covers it.**/tests from the issue first; they should fail on HEAD. Then special-case**followed by a separator before masking, so the Glob*and?never match across/or\, so any item containing a slash is filtered out #114 behaviour stays intact.Generated by Claude Code
Make glob **/ match zero or more path segments again [patch]