Skip to content

fix: preserve UNC paths in pwd and readlink#12641

Open
a-rookie-of-C-language wants to merge 1 commit into
uutils:mainfrom
a-rookie-of-C-language:fix/windows-pwd-unc
Open

fix: preserve UNC paths in pwd and readlink#12641
a-rookie-of-C-language wants to merge 1 commit into
uutils:mainfrom
a-rookie-of-C-language:fix/windows-pwd-unc

Conversation

@a-rookie-of-C-language
Copy link
Copy Markdown

Summary

  • Fix pwd -P on Windows when canonicalize() returns a verbatim UNC path.
  • Fix readlink -f on Windows when canonicalization returns a verbatim UNC path.
  • Convert \\?\UNC\server\share\... back to \\server\share\... instead of incorrectly printing UNC\server\share\....
  • Preserve the existing handling for regular verbatim paths like \\?\C:\....

Validation

  • cargo check --manifest-path deps\coreutils\Cargo.toml -p uu_pwd -p uu_readlink
  • cargo run --manifest-path deps\coreutils\Cargo.toml -p uu_pwd -- -P
  • cargo run --manifest-path deps\coreutils\Cargo.toml -p uu_readlink -- -f .

@cakebaker
Copy link
Copy Markdown
Contributor

@a-rookie-of-C-language your PR contains many unrelated commits. Please remove them.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

GNU testsuite comparison:

Congrats! The gnu test tests/cp/link-heap is now passing!
Congrats! The gnu test tests/tail/pipe-f is now passing!

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