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 eryksun
Recipients alanmcintyre, eryksun, ldoktor, serhiy.storchaka, twouters
Date 2016-06-14.15:23:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1465917800.59.0.105049713065.issue27318@psf.upfronthosting.co.za>
In-reply-to
Content
os.symlink needs the target_is_directory argument on Windows. Maybe extract() can search for the link target in namelist() to determine if it's a directory (i.e. ends in "/"). Note that the flag gets set automatically if the target exists, so this is only a problem when a link is extracted before the target.

Also, I think it should fall back on creating a regular file if os.symlink raises OSError. On Windows this occurs if the user doesn't have SeCreateSymbolicLinkPrivilege. os.symlink raises a plain OSError in this case; no errno/winerror is set. (I don't know why it doesn't simply call CreateSymbolicLink and raise an exception for the last error, which would be ERROR_PRIVILEGE_NOT_HELD.)
History
Date User Action Args
2016-06-14 15:23:20eryksunsetrecipients: + eryksun, twouters, alanmcintyre, serhiy.storchaka, ldoktor
2016-06-14 15:23:20eryksunsetmessageid: <1465917800.59.0.105049713065.issue27318@psf.upfronthosting.co.za>
2016-06-14 15:23:20eryksunlinkissue27318 messages
2016-06-14 15:23:20eryksuncreate