GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — bpo-29248: Fix readlink bug os by SSE4 · Pull Request #5577 · python/cpython Conversation
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. Thanks again to your contribution and we look forward to looking at it! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Signed-off-by: SSE4 <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Otherwise looks good.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| and os.path.exists(r'C:\ProgramData'), | ||
| 'Test directories not found') | ||
| def test_29248(self): | ||
| target = os.readlink(r'C:\Users\All Users') |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I would add the explanation from the tracker issue (why we're using this link instead of creating a fresh one to test) here as a comment.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
done
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@SSE4 please let us know when you sign the CLA form so we can merge this PR. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@berkerpeksag I already did earlier today |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @@ -0,0 +1 @@ | |||
| fix os.readlink() on Windows | |||
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Please make the news entry more descriptive and add "Patch by Craig Holmquist and Your Name."
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
done
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } | ||
| print_name = rdb->SymbolicLinkReparseBuffer.PathBuffer + | ||
| rdb->SymbolicLinkReparseBuffer.PrintNameOffset; | ||
| (rdb->SymbolicLinkReparseBuffer.PrintNameOffset / 2); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can PrintNameOffset be odd?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
PathBuffer is of type wchar_t. Strictly this should use sizeof(wchar_t) instead of 2. Alternatively it can use two casts to have the compiler do the work: (wchar_t *)((char *)rdb->SymbolicLinkReparseBuffer.PathBuffer + rdb->SymbolicLinkReparseBuffer.PrintNameOffset).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
done
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| (rdb->SymbolicLinkReparseBuffer.PrintNameOffset / 2); | ||
|
|
||
| result = PyUnicode_FromWideChar(print_name, | ||
| rdb->SymbolicLinkReparseBuffer.PrintNameLength/2); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Strictly this should also use sizeof(wchar_t) instead of hard coding 2.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
done
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
All review comments have been addressed and this looks good to me. I will wait for a day or two to give everyone a chance to look at the patch and merge it. Thanks!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@berkerpeksag okay, 3 days passed already, what's the next action to be done? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @SSE4 for the PR, and @berkerpeksag for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-5640 is a backport of this pull request to the 3.6 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The PrintNameOffset field of the reparse data buffer was treated as a number of characters instead of bytes. (cherry picked from commit 3c34aad) Co-authored-by: SSE4 <[email protected]>
The PrintNameOffset field of the reparse data buffer was treated as a number of characters instead of bytes. (cherry picked from commit 3c34aad) Co-authored-by: SSE4 <[email protected]>
|
@Mariatta do I need to backport this to 3.7 branch manually or is there some sort of queue? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @SSE4 for the PR, and @berkerpeksag for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-5644 is a backport of this pull request to the 3.7 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The PrintNameOffset field of the reparse data buffer was treated as a number of characters instead of bytes. (cherry picked from commit 3c34aad) Co-authored-by: SSE4 <[email protected]>
|
@berkerpeksag I think this was merged at the same time miss-islington was being deployed, so it missed that webhook event. I've reapplied the label to trigger the backport. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@Mariatta thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The PrintNameOffset field of the reparse data buffer was treated as a number of characters instead of bytes. (cherry picked from commit 3c34aad) Co-authored-by: SSE4 <[email protected]>
|
@berkerpeksag I noticed that the news file is the only one in the repo to use CRLF. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.