glob: honour backslash escapes of non-special characters in scan() - #32876
Open
robobun wants to merge 5 commits into
Open
glob: honour backslash escapes of non-special characters in scan()#32876robobun wants to merge 5 commits into
robobun wants to merge 5 commits into
Claude / Claude Code Review
completed
Jun 27, 2026 in 21m 16s
Code review found 1 potential issue
Found 1 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/glob/GlobWalker.rs:1866 |
Windows: trailing-backslash component loses Literal classification |
Annotations
Check warning on line 1866 in src/glob/GlobWalker.rs
claude / Claude Code Review
Windows: trailing-backslash component loses Literal classification
The PR description's "no-op on Windows" claim isn't quite accurate for patterns *ending* in `\` — `build_pattern_components` includes a trailing separator in `comp_slice`, so on Windows `check_special_syntax("foo\\")` now returns true and the final component classifies as `SyntaxHint::None` instead of `Literal`. Matching is still correct (`pattern_slice()` strips `trailing_sep` before `glob::match`), and the resulting behavior is arguably *more* correct (`only_files`/`trailing_sep` are now honor
Loading