Scott Leerssen <sleers...@gmail.com> added the comment:

I just hit the same issue.  This seems to work:


Modified:Lib/tarfile.py
===================================================================
---Lib/tarfile.py       2011-04-26 20:36:33 UTC (rev 49502)
+++Lib/tarfile.py       2011-04-26 21:01:24 UTC (rev 49503)
@@ -2239,6 +2239,8 @@
        if hasattr(os, "symlink") and hasattr(os, "link"):
            # For systems that support symbolic and hard links.
            if tarinfo.issym():
+                if os.path.exists(targetpath):
+                    os.unlink(targetpath)
                os.symlink(tarinfo.linkname, targetpath)
            else:
                # See extract().

----------
nosy: +Scott.Leerssen

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10761>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to