Skip to content

dirname: remove unsafe Windows prefix conversion - #15219

Open
mattsu2020 wants to merge 1 commit into
uutils:mainfrom
mattsu2020:dirname_unsafe
Open

mattsu2020 wants to merge 1 commit into
uutils:mainfrom
mattsu2020:dirname_unsafe

Conversation

@mattsu2020

@mattsu2020 mattsu2020 commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Windows prefix parsing unnecessarily reconstructed an OsStr with unsafe code. Pass the original OsStr instead, preserving byte conversion behavior and adding a regression test for unpaired UTF-16 surrogates, including -z.

Closes #15218

@mattsu2020
mattsu2020 marked this pull request as ready for review October 10, 2026 07:28

@xtqqczze xtqqczze left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation comments may need to be updated.

cc: @naoNao89

This branch has not been deployed

No deployments
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.

dirname: remove unnecessary unsafe conversion in Windows prefix parsing

2 participants