Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

win: handle win32 namespaces#4910

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
savashn wants to merge7 commits intolibuv:v1.x
base:v1.x
Choose a base branch
Loading
fromsavashn:win32-namespaces

Conversation

@savashn
Copy link
Contributor

Theuv_chdir function has a TODO comment asking win32 namespaces to be handled.

This PR implements comprehensive Windows path format handling by introducing a newuv__extract_drive_letter helper function that parses all Windows path formats:

  • Regular paths:C:\Windows
  • Win32 file namespace:\\?\C:\LongPath
  • Win32 device namespace:\\.\C:
  • NT namespace:\??\C:\Path
  • UNC paths:\\server\share (returns 0, no drive letter)
  • UNC with namespace:\\?\UNC\server\share (returns 0)
  • Volume GUIDs:\\?\Volume{...} (returns 0)
  • GLOBALROOT:\\?\GLOBALROOT\... (explicitly rejected)

Additionally, path length validation (32767 character limit) and forward slash handling have been added.

This commit introduces a comprehensive path parser that handles:- Win32 file namespace: \?\C:\path- Win32 device namespace: \.\C:- NT namespace: \??\C:\path- UNC paths: \server\share and \?\UNC\server\share- Volume GUID paths: \?\Volume{...}- Special paths: \?\GLOBALROOT\...The implementation also adds validation for:- NULL and empty input strings- Path length limits (32767 characters for Win32 namespace)- Forward slash rejection in Win32 namespaces (which don't support normalization)- Explicit rejection of GLOBALROOT paths
@savashn
Copy link
ContributorAuthor

All done as requested.

@savashnsavashn requested a review fromvtjnashOctober 18, 2025 11:24
Copy link
Member

@bnoordhuisbnoordhuis left a comment

Choose a reason for hiding this comment

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

Tell me it's ai-generated code without telling me it's ai-generated code. The comments all have that strong "add 1 to i" vibe that llms are infamous for.

Superfluous comments are distracting. Libuv's house style is comments should be added only when it's not obviouswhy code does what it does.

Stress onwhy; if it's not obviouswhat code does, that's a clear sign it's bad code.

@savashn
Copy link
ContributorAuthor

I just wanted to help out with this great project you're working on. Respectfully.

@savashn
Copy link
ContributorAuthor

savashn commentedOct 20, 2025
edited
Loading

Thank you for your time.

I’m not sure if I should close this PR. I’ve implemented your suggestions, so I'll leave it open. But feel free to close it if you prefer.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@bnoordhuisbnoordhuisbnoordhuis left review comments

@vtjnashvtjnashAwaiting requested review from vtjnash

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@savashn@bnoordhuis@vtjnash

[8]ページ先頭

©2009-2025 Movatter.jp