Skip to content

absolutize() should return error for ambiguous paths#63

Merged
chipsenkbeil merged 2 commits into
chipsenkbeil:mainfrom
dlenski:absolutize_failure
Apr 6, 2026
Merged

absolutize() should return error for ambiguous paths#63
chipsenkbeil merged 2 commits into
chipsenkbeil:mainfrom
dlenski:absolutize_failure

Conversation

@dlenski
Copy link
Copy Markdown
Contributor

@dlenski dlenski commented Apr 2, 2026

This addresses the "silent failure" piece of #61, and adds specific test cases:

  • C:something: ambiguous because Windows maintains a per-disk cwd as a relic of MS-DOS, but only in certain contexts. (In others, this is treated as equivalent to C:\something.)
  • \\server: this isn't a complete path. Without adding \share on the end, it can't be used in most contexts where Windows would allow a directory path; it should probably be !is_valid() as well as !is_absolute().

@dlenski dlenski force-pushed the absolutize_failure branch from dafe463 to 18185f7 Compare April 5, 2026 12:19
This addresses the "silent failure" piece of
chipsenkbeil#61,
and adds specific test cases:

- `C:something`: ambiguous because Windows maintains
  a per-disk cwd as a relic of MS-DOS, but only in
  certain contexts. (In others, this is treated as
  equivalent to `C:\something`.)
- `\\server`: this isn't a complete path. Without
  adding `\share` on the end, it can't be used in
  most contexts where Windows would allow a directory
  path; it should probably be `!is_valid()` as well
  as `!is_absolute()`.
@dlenski dlenski force-pushed the absolutize_failure branch from 18185f7 to 453a824 Compare April 5, 2026 18:48
(Could bump to 1.74 and omit this commit)
@chipsenkbeil
Copy link
Copy Markdown
Owner

Looks good to me. Thanks!

@chipsenkbeil chipsenkbeil merged commit 6362c6f into chipsenkbeil:main Apr 6, 2026
17 checks passed
@dlenski dlenski deleted the absolutize_failure branch April 6, 2026 19:06
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