fix(cli): handle Windows verbatim prefixes in cwd filter - #67
Merged
NishantJoshi00 merged 1 commit intoSep 25, 2026
Merged
NishantJoshi00 merged 1 commit into
NishantJoshi00 merged 1 commit into
Conversation
Drix10
force-pushed
the
fix/windows-under-dir-verbatim-prefix
branch
from
September 24, 2026 02:24
8dbe7f4 to
e32a492
Compare
NishantJoshi00
approved these changes
Sep 25, 2026
This was referenced Sep 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: #66
What changed and why?
under_dir(the--cwdfilter behindlist/query) compared a canonicalizeddiragainst a possibly-uncanonicalizablesession_cwdwith a plaincase-sensitive
starts_with. On Windows that breaks three ways: sessions under deleted directories vanish from listings (\\?\prefix mismatch),/-spelled paths miss, and case differences miss.Now, on Windows only: strip the verbatim-device prefix (
\\?\, including the\\?\UNC\→\\server\sharenetwork-share form) via wide-char prefixmath (safe for non-UTF8 paths), and compare components case-insensitively (Unicode lowercase, approximating filesystem folding). Other platforms keep the
exact
Path::starts_with— non-Windows behavior is byte-identical.Tests:
filter_testsincli/src/lib.rs— verbatim/UNC stripping unit tests, the exact reported scenario (live tempdir + vanished child), and thecasing/separator matrix (Windows-gated, since drive-letter paths only parse there).
Checks:
cargo test -p txcript-cli --lib(107 passed),cargo fmt --checkandcargo clippy -p txcript-cli --all-targets(zero warnings) — run underthe GNU toolchain, CI's MSVC run will confirm.