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

gh-82367: UseFindFirstFile Win32 API inntpath.realpath()#110298

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

Conversation

moonsikpark
Copy link
Contributor

@moonsikparkmoonsikpark commentedOct 3, 2023
edited by github-actionsbot
Loading

ntpath.realpath() breaks out of traversing a series of paths where a (handled) ERROR_ACCESS_DENIED or ERROR_SHARING_VIOLATION occurs.

UsingFindFirstFile Win32 API, we can query their real name to correct the case and also resolve MS-DOS (also called 8.3) style file names such asC:\\LONGFI~1.TXT.


📚 Documentation preview 📚:https://cpython-previews--110298.org.readthedocs.build/

Copy link
Member

@zwarezware left a comment

Choose a reason for hiding this comment

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

A few documentation nits, but mostly this looks pretty good to me. It will need approval from either@zooba or@eryksun before I'd be comfortable merging it, though.

@zwarezware requested review fromeryksun andzoobaOctober 3, 2023 17:28
@zooba
Copy link
Member

The code change looks great to me. Awesome job!

With Zach's requested doc changes, I think this is good to merge.

@moonsikparkmoonsikparkforce-pushed thegh-82367-use-findfirstfile-in-nt-realpath branch from2c49ffc to4590347CompareOctober 4, 2023 11:38
moonsikpark added a commit to moonsikpark/cpython that referenced this pull requestOct 4, 2023
…ython#110298)* Use `FindFirstFile` Win32 API to fix a bug where `ntpath.realpath()`breaks out of traversing a series of paths where a (handled)`ERROR_ACCESS_DENIED` or `ERROR_SHARING_VIOLATION` occurs.* Update docs to reflect that `ntpath.realpath()` eliminates MS-DOSstyle names.
@moonsikparkmoonsikparkforce-pushed thegh-82367-use-findfirstfile-in-nt-realpath branch from4590347 tof675a4fCompareOctober 4, 2023 11:50
@ghost
Copy link

ghost commentedOct 4, 2023
edited by ghost
Loading

All commit authors signed the Contributor License Agreement.
CLA signed

moonsikpark added a commit to moonsikpark/cpython that referenced this pull requestOct 4, 2023
…ython#110298)* Use `FindFirstFile` Win32 API to fix a bug where `ntpath.realpath()`breaks out of traversing a series of paths where a (handled)`ERROR_ACCESS_DENIED` or `ERROR_SHARING_VIOLATION` occurs.* Update docs to reflect that `ntpath.realpath()` eliminates MS-DOSstyle names.
@moonsikparkmoonsikparkforce-pushed thegh-82367-use-findfirstfile-in-nt-realpath branch fromd88c757 toe17852cCompareOctober 4, 2023 14:41
Copy link
Contributor

@eryksuneryksun left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you, Moonsik, and thanks also for taking the extra time to make the test more robust.

moonsikpark and zware reacted with thumbs up emojizware reacted with heart emoji
…ython#110298)* Use `FindFirstFile` Win32 API to fix a bug where `ntpath.realpath()`breaks out of traversing a series of paths where a (handled)`ERROR_ACCESS_DENIED` or `ERROR_SHARING_VIOLATION` occurs.* Update docs to reflect that `ntpath.realpath()` eliminates MS-DOSstyle names.
@moonsikparkmoonsikparkforce-pushed thegh-82367-use-findfirstfile-in-nt-realpath branch from1766bc3 to2b5a29eCompareOctober 5, 2023 08:38
@zwarezware merged commitd33aa18 intopython:mainOct 5, 2023
@zware
Copy link
Member

Thanks Steve and Eryk for the reviews, and Moonsik for the patch and excellent collaboration!

moonsikpark reacted with thumbs up emoji

@moonsikparkmoonsikpark deleted the gh-82367-use-findfirstfile-in-nt-realpath branchOctober 5, 2023 17:10
@moonsikparkmoonsikpark restored the gh-82367-use-findfirstfile-in-nt-realpath branchOctober 6, 2023 02:17
@moonsikparkmoonsikpark deleted the gh-82367-use-findfirstfile-in-nt-realpath branchOctober 6, 2023 02:20
Glyphack pushed a commit to Glyphack/cpython that referenced this pull requestSep 2, 2024
…ythonGH-110298)* Use `FindFirstFile` Win32 API to fix a bug where `ntpath.realpath()`breaks out of traversing a series of paths where a (handled)`ERROR_ACCESS_DENIED` or `ERROR_SHARING_VIOLATION` occurs.* Update docs to reflect that `ntpath.realpath()` eliminates MS-DOSstyle names.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@zwarezwarezware left review comments

@eryksuneryksuneryksun approved these changes

@zoobazoobaAwaiting requested review from zooba

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@moonsikpark@zooba@zware@eryksun

[8]ページ先頭

©2009-2025 Movatter.jp