Uh oh!
There was an error while loading. Please reload this page.
gh-82367: Use FindFirstFile Win32 API in ntpath.realpath() - #110298
Conversation
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.
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
f675a4fCompare…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.
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/