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
fs_win api_path mangles drive-root paths (C:\. -> \?\C:), shared by stat/rm/touch/du/find and more #1869
In WinuxCmd's Windows path funnel (fs_win.rs, api_path), a path that lands exactly on a drive root is mangled by the trailing-component truncation: C:\. is cut to a bare C:, producing \\?\C: — an invalid device-namespace path. Every command that resolves operands through api_path inherits the defect at drive roots.
The mechanism here is code-located: fs_win.rs:341 (Windows impl) — the tail truncation turns a drive-root landing into the bare drive letter before the \\?\ prefix is applied.
The exposure set below is a code survey (captain lane L4, 2026-11-24), not yet a host-confirmed set: A-level (call api_path directly or via internal entry points) — stat, pathchk, ln, rm, touch, tee, du, find, glob; B-level (via file_meta only) — fmt, fold, paste; cp is in scope only on its symlink-creation face. Per-command confirmation on a real Windows host (run matrix) is still owed — the X299 tunnel is down — and a unit-level pin on the pure path transformation is being landed with the fix as the executable evidence for the mechanism itself.
Expected
At a drive root, operands like . / C:\. resolve to the root directory itself (GNU/Windows semantics as in the #1862 fix), for every command sharing the funnel — one fix in api_path, not per-command patches.
CAPTAIN note — the fix has merged (PR #1871): api_path now restores the root separator on bare-drive landings, with the six pins landed via a CI two-stage fail-first (pins-only run: exactly the three discriminating shapes red; with the fix: 1075 pass / 0 fail; full CI 28 pass). This issue stays open until the L4 real-machine matrix (stat/find/touch/pathchk/fmt/fold/paste vs the recorded DEFECT baseline) is re-run after X299 returns.
fmt / fold / paste: . and C:\. are back to the CTRL error class (was class-polluted DEFECT).
du / ls / rm / tee: green/unchanged, as baselined.
What remains red is a different, wider face the baseline shapes happened to cover: any operand containing a .. component (even resolving to an ordinary directory) fails in stat/touch, and the fmt family's .. / explicit-root operands fail with wrong error classes. A/B proves it predates #1871 (identical in v1.2.2), so it is not a regression from this fix; it is tracked as #1872 with the full shape set as its acceptance matrix. This issue's named defect — the bare-drive-root normalization — is done.
Activity
fix(fs_win): restore the root separator when api_path lands on a bare…
caomengxuan666 commentedon Nov 25, 2026
CAPTAIN note — the fix has merged (PR #1871):
api_pathnow restores the root separator on bare-drive landings, with the six pins landed via a CI two-stage fail-first (pins-only run: exactly the three discriminating shapes red; with the fix: 1075 pass / 0 fail; full CI 28 pass). This issue stays open until the L4 real-machine matrix (stat/find/touch/pathchk/fmt/fold/paste vs the recorded DEFECT baseline) is re-run after X299 returns.caomengxuan666 commentedon Nov 25, 2026
CAPTAIN-VERIFY — closing on the v1.2.3 host matrix; the remaining face is split to #1872.
Real-host matrix (devin-windows, Windows Server 2022, published v1.2.3 binaries) against the 2026-11-24 baseline recorded for this issue:
.,C:\.,C:\and CTRL shapes green — the bare-rootapi_pathdefect fix(fs_win): api_path restores the root separator on bare-drive landings #1871 targeted is fixed and verified (A/B:.at root was red in v1.2.2, green in v1.2.3)..andC:\.are back to the CTRL error class (was class-polluted DEFECT).What remains red is a different, wider face the baseline shapes happened to cover: any operand containing a
..component (even resolving to an ordinary directory) fails in stat/touch, and the fmt family's../ explicit-root operands fail with wrong error classes. A/B proves it predates #1871 (identical in v1.2.2), so it is not a regression from this fix; it is tracked as #1872 with the full shape set as its acceptance matrix. This issue's named defect — the bare-drive-root normalization — is done.test(fs_win): pin api_path drive-root dot-segment shapes
test: pin unixwin#1872 dot-dot operand shapes (api_path + stat/fmt/fo…