Skip to content

fix(cli): handle Windows verbatim prefixes in cwd filter - #67

Merged
NishantJoshi00 merged 1 commit into
skillsynchq:mainfrom
Drix10:fix/windows-under-dir-verbatim-prefix
Sep 25, 2026
Merged

NishantJoshi00 merged 1 commit into
skillsynchq:mainfrom
Drix10:fix/windows-under-dir-verbatim-prefix

Conversation

@Drix10

@Drix10 Drix10 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Issue: #66

What changed and why?

under_dir (the --cwd filter behind list/query) compared a canonicalized dir against a possibly-uncanonicalizable session_cwd with a plain
case-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\share network-share form) via wide-char prefix
math (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_tests in cli/src/lib.rs — verbatim/UNC stripping unit tests, the exact reported scenario (live tempdir + vanished child), and the
casing/separator matrix (Windows-gated, since drive-letter paths only parse there).

Checks: cargo test -p txcript-cli --lib (107 passed), cargo fmt --check and cargo clippy -p txcript-cli --all-targets (zero warnings) — run under
the GNU toolchain, CI's MSVC run will confirm.

@Drix10
Drix10 force-pushed the fix/windows-under-dir-verbatim-prefix branch from 8dbe7f4 to e32a492 Compare September 24, 2026 02:24
@NishantJoshi00
NishantJoshi00 merged commit b94c74f into skillsynchq:main Sep 25, 2026
8 checks passed
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.

2 participants