diff --git a/Lib/tarfile.py b/Lib/tarfile.py index 226d4818ca7..af32b0f2cbd 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -2351,12 +2351,6 @@ def makelink(self, tarinfo, targetpath): self._extract_member(self._find_link_target(tarinfo), targetpath) except symlink_exception: - if tarinfo.issym(): - linkpath = os.path.join(os.path.dirname(tarinfo.name), - tarinfo.linkname) - else: - linkpath = tarinfo.linkname - else: try: self._extract_member(self._find_link_target(tarinfo), targetpath) diff --git a/Misc/NEWS b/Misc/NEWS index 08f897f583b..7adf4f79773 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -97,6 +97,8 @@ Core and Builtins Library ------- +- Issue #12926: Fix a bug in tarfile's link extraction. + - Issue #13696: Fix the 302 Relative URL Redirection problem. - Issue #13636: Weak ciphers are now disabled by default in the ssl module