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 martin.panter
Recipients SilentGhost, barry, lars.gustaebel, martin.panter, mvo, serhiy.storchaka
Date 2018-12-16.01:34:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1544924069.86.0.788709270274.issue23228@psf.upfronthosting.co.za>
In-reply-to
Content
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()
History
Date User Action Args
2018-12-16 01:34:30martin.pantersetrecipients: + martin.panter, barry, lars.gustaebel, mvo, SilentGhost, serhiy.storchaka
2018-12-16 01:34:29martin.pantersetmessageid: <1544924069.86.0.788709270274.issue23228@psf.upfronthosting.co.za>
2018-12-16 01:34:29martin.panterlinkissue23228 messages
2018-12-16 01:34:26martin.pantercreate