Message265146
| 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:30 | lars.gustaebel | set | recipients:
+ lars.gustaebel, barry, mvo, SilentGhost, serhiy.storchaka |
| 2016年05月08日 15:16:30 | lars.gustaebel | set | messageid: <1462720590.74.0.945080665162.issue23228@psf.upfronthosting.co.za> |
| 2016年05月08日 15:16:30 | lars.gustaebel | link | issue23228 messages |
| 2016年05月08日 15:16:30 | lars.gustaebel | create |
|