This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author srid
Recipients srid
Date 2010-12-23.00:17:10
SpamBayes Score 1.5980093e-05
Marked as misclassified No
Message-id <1293063436.61.0.0994372418071.issue10761@psf.upfronthosting.co.za>
In-reply-to
Content
tarfile.extractall overwrites normal files and directories, yet it fails to overwrite symlinks:

  [..]
    tf.extractall()
  File "/opt/ActivePython-2.7/lib/python2.7/tarfile.py", line 2046, in extractall
    self.extract(tarinfo, path)
  File "/opt/ActivePython-2.7/lib/python2.7/tarfile.py", line 2083, in extract
    self._extract_member(tarinfo, os.path.join(path, tarinfo.name))
  File "/opt/ActivePython-2.7/lib/python2.7/tarfile.py", line 2167, in _extract_member
    self.makelink(tarinfo, targetpath)
  File "/opt/ActivePython-2.7/lib/python2.7/tarfile.py", line 2243, in makelink
    os.symlink(tarinfo.linkname, targetpath)
OSError: [Errno 17] File exists

To reproduce, use a .tar.gz file containing relative (i.e., in the same directory) symlinks.

Perhaps it should delete `targetpath` before attempting to create a symlink.
History
Date User Action Args
2010-12-23 00:17:16sridsetrecipients: + srid
2010-12-23 00:17:16sridsetmessageid: <1293063436.61.0.0994372418071.issue10761@psf.upfronthosting.co.za>
2010-12-23 00:17:11sridlinkissue10761 messages
2010-12-23 00:17:10sridcreate