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
A glob class range spanning U+E000 matches every / and \: x[ア-z] matches "x/", and x[!ア-z] rejects it (gap in #157) #208
Before DotNet.Glob sees a pattern or text, / and \ are both replaced with the private-use character U+E000 (MaskedPathSeparator, TextFilter/TextFilter.cs:453). #157 kept class ranges that span the real separators off the native path, but SpansPathSeparator (lines 745–746) only checks / and \, never U+E000 itself:
A letter range whose endpoints straddle U+E000 (e.g. katakana → full-width forms, or an IME slip like a-z) therefore goes to DotNet.Glob natively (IsNativeGlobRange, lines 741–743). In the masked text every separator is U+E000, which is inside the range. The listed path has the same gap: CollectGlobClassMembers (line ~769) enumerates U+E000 as a member, so a negated listed class excludes every separator.
Filter example with items docs/, src/, readme.md, メモ.txt, メモ:
-*[ァ-z] ("hide names ending in katakana or full-width letters") gives readme.md, メモ.txt, wrongly hiding docs/ and src/
*[ァ-z] gives docs/, src/, メモ, wrongly including both directories
Why it matters
Ranges ending in the full-width/half-width forms block (U+FF00–U+FFEF) are ordinary for CJK users. Such a class silently matches, or under negation rejects, every path separator, so include and exclude filters disagree with the documented class semantics for any path-like item.
This is distinct from #194 (a literal U+E000 already in the text is read as a separator) and #175 (both separators share one mask). Remapping a literal U+E000 to another private-use character, as #194 suggests, would not fix this, because these ranges cover the whole private-use block.
Suggested fix / acceptance criteria
SpansPathSeparator also returns true when first <= MaskedPathSeparator && MaskedPathSeparator <= last, so the range is listed rather than handed to DotNet.Glob natively
CollectGlobClassMembers leaves out U+E000 unless / or \ is genuinely a member
Tests for each row in the table above, including the [0-9a-z] / [!0-9a-z] mixed-class variants
Activity