Message331911
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() |
|
Date |
User |
Action |
Args |
2018-12-16 01:34:30 | martin.panter | set | recipients:
+ martin.panter, barry, lars.gustaebel, mvo, SilentGhost, serhiy.storchaka |
2018-12-16 01:34:29 | martin.panter | set | messageid: <1544924069.86.0.788709270274.issue23228@psf.upfronthosting.co.za> |
2018-12-16 01:34:29 | martin.panter | link | issue23228 messages |
2018-12-16 01:34:26 | martin.panter | create | |
|