Martin Panter <vadmium...@gmail.com> added the comment: The problem with WindowsError should only exist in 3.4+. 2.7 doesn’t support creating symlinks on Windows.
Michael’s fix is the same as already done in 2.7 for Issue 10761 and (part of) Issue 12088. However I’m not sure that is the best approach for a bug fix. Also see Issue 19974 proposing to replace existing directory entries in all cases, including replacing empty subdirectories, and not just when extracting symlinks. I suspect Michael has only fixed the recursive loop on Unix. What happens if an exception is raised because symlinks are not supported (e.g. Windows)? Possible test case: data = BytesIO() writer = tarfile.TarFile(fileobj=data, mode='w') selflink = tarfile.TarInfo('self') selflink.size = 0 selflink.type = tarfile.SYMTYPE selflink.linkname = selflink.name writer.addfile(selflink) writer.close() data.seek(0) tarfile.TarFile(fileobj=data).extractall() ---------- nosy: +martin.panter _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue23228> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com