-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-12800: tarfile: Restore fix from 011525ee9 #21409
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
Conversation
Closing and re-opening to restart the Travis-CI check. |
@@ -2232,6 +2232,8 @@ def makelink(self, tarinfo, targetpath): | |||
try: | |||
# For systems that support symbolic and hard links. | |||
if tarinfo.issym(): | |||
if os.path.lexists(targetpath): |
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.
@JulienPalard, perhaps include a short comment here explaining why this is needed? Something along the lines of "tar should overwrite existing files with symlinks, but os.symlink raises an exception rather than overwriting."
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.
This LGTM, just waiting on the possible addition of a code comment.
Thanks @JulienPalard for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9. |
GH-23508 is a backport of this pull request to the 3.9 branch. |
GH-23509 is a backport of this pull request to the 3.8 branch. |
Restore fix from 011525e.
While reviewing #20972 I spotted the code already existed, the test already existed, but was not seeing the error due to:
https://bugs.python.org/issue12800