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 lars.gustaebel
Recipients SilentGhost, barry, lars.gustaebel, mvo, serhiy.storchaka
Date 2016-05-08.15:16:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1462720590.74.0.945080665162.issue23228@psf.upfronthosting.co.za>
In-reply-to
Content
TarFile.makelink() has a fallback mode in case the platform does not support links. Instead of a symlink or a hardlink it extracts the file it points to as long as it exists in the current archive.

More precisely, makelink() calls os.symlink() and if one of the exceptions in the symlink_exception tuple is raised, it goes into fallback mode. r80944 introduced a regression because it replaced the WindowsError in symlink_exception with an OSError which is much less specific than a WindowsError. Since that change, the fallback is used everytime an OSError occurs, in Michael's case it is a FileExistsError, because the symlink is already there.

The attached patch restores the old behavior. This might not be what you wanted, Michael, but at least, tarfile no longer crashes.
History
Date User Action Args
2016-05-08 15:16:30lars.gustaebelsetrecipients: + lars.gustaebel, barry, mvo, SilentGhost, serhiy.storchaka
2016-05-08 15:16:30lars.gustaebelsetmessageid: <1462720590.74.0.945080665162.issue23228@psf.upfronthosting.co.za>
2016-05-08 15:16:30lars.gustaebellinkissue23228 messages
2016-05-08 15:16:30lars.gustaebelcreate