Repository navigation
Close four Windows path gaps: UNC host case, drive-relative paths, directive drive paths, PATH case - #443
Conversation
…rective drive paths, PATH case - A UNC host name is lower-cased in the canonical path form, so a path that came through a URI is found inside a root typed with another case. - 'do C:foo.do' and 'cd C:sub' resolve in the working directory when it is on that drive. - A directive path is returned in canonical form on Windows (C:\x\parent.do); a UNC directive path keeps both leading separators there. - The installer's PATH check ignores case on Windows.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
… paths in directives and at the workspace root - The path-case walk compared a source path's UNC host exactly against a root whose host was already lower-cased, skipped the walk and called a case-only file name exact. - An extended UNC path (\\?\UNC\host) has its host folded as well. - 'sight: done-by C:parent.do' resolves beside the file, and 'do C:foo.do' is tried at the workspace root as other relative paths are.
|
Note 🤖 Claude Fable 5.2 responding on behalf of jbearak An independent review of the first commit found four defects. All are fixed in the next commit, each with a test that passes the Windows platform explicitly.
The module header now says the UNC host is folded. |
Four small Windows path gaps left open after #440.
\\Server\share\projheld its files as\\server\share\proj\…once a path had been through a URI, which lower-cases the host. The root check compared them exactly, so the files fell outside the root. The canonical path form now lower-cases the UNC host. The share and directory names keep their case.do C:foo.doandcd C:submean "in drive C's current directory". Sight joined them asC:\wd\C:foo.doand reported the file missing. When the working directory is on that drive they now resolve there. A path on another drive is left as before: its current directory is unknown.DirectiveParser.resolve_pathgaveC:/x/parent.doon Windows where every other path isC:\x\parent.do, and collapsed a UNC directive path//server/share/xto\server\share\x. On Windows it now returns the canonical form. Other platforms are unchanged.is_path_in_envcompared PATH entries exactly, soc:\users\me\bindid not matchC:\Users\Me\binand the installer said the directory was not on PATH. It ignores case on Windows.Proof
tests/unit/utils/fs-path.test.tspass the platform explicitly, so they run on every host. Seven of them fail without the source change.check:line-endings,typecheck,lintpass;bun test ./tests: 10,485 pass, 15 skip, 0 fail.Summary by CodeRabbit