Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-82367: Use FindFirstFile Win32 API in ntpath.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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-82367: Use FindFirstFile Win32 API in ntpath.realpath()#110298
Uh oh!
There was an error while loading. Please reload this page.
Conversation
moonsikpark commented Oct 3, 2023 • edited by github-actions bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by github-actions bot
Uh oh!
There was an error while loading. Please reload this page.
zware left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh oh!
There was an error while loading. Please reload this page.
Misc/NEWS.d/next/Windows/2023-10-03-12-30-59.gh-issue-82367.nxwfMx.rst Outdated Show resolvedHide resolved
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
zooba commented Oct 3, 2023
The code change looks great to me. Awesome job! With Zach's requested doc changes, I think this is good to merge. |
2c49ffc to 4590347Compare…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-DOS style names.
4590347 to f675a4fCompareghost commented Oct 4, 2023 • edited by ghost
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by ghost
Uh oh!
There was an error while loading. Please reload this page.
…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-DOS style names.
d88c757 to e17852cCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
eryksun left a comment
There was a problem hiding this 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.
…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-DOS style names.
1766bc3 to 2b5a29eComparezware commented Oct 5, 2023
Thanks Steve and Eryk for the reviews, and Moonsik for the patch and excellent collaboration! |
…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-DOS style names.
The test was added in pythongh-110298, with a fix that was never backported to 3.12 and below. It was most likely skipped in the GHA run.
ntpath.realpath()breaks out of traversing a series of paths where a (handled) ERROR_ACCESS_DENIED or ERROR_SHARING_VIOLATION occurs.Using
FindFirstFileWin32 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/