Message135925
here is a diff of a better fix based on the previous patch:
Index: tarfile.py
===================================================================
--- tarfile.py (revision 49758)
+++ tarfile.py (working copy)
@@ -2239,12 +2239,14 @@
if hasattr(os, "symlink") and hasattr(os, "link"):
# For systems that support symbolic and hard links.
if tarinfo.issym():
- if os.path.exists(targetpath):
+ if os.path.lexists(targetpath):
os.unlink(targetpath)
os.symlink(tarinfo.linkname, targetpath)
else:
# See extract().
if os.path.exists(tarinfo._link_target):
+ if os.path.lexists(targetpath):
+ os.unlink(targetpath)
os.link(tarinfo._link_target, targetpath)
else:
self._extract_member(self._find_link_target(tarinfo), targetpath) |
|
Date |
User |
Action |
Args |
2011-05-13 16:57:08 | Scott.Leerssen | set | recipients:
+ Scott.Leerssen, lars.gustaebel, orsenthil, pitrou, srid, santoso.wijaya, python-dev |
2011-05-13 16:57:08 | Scott.Leerssen | set | messageid: <1305305828.72.0.0214989644134.issue10761@psf.upfronthosting.co.za> |
2011-05-13 16:57:08 | Scott.Leerssen | link | issue10761 messages |
2011-05-13 16:57:08 | Scott.Leerssen | create | |
|