Message268562
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.) |
|
Date |
User |
Action |
Args |
2016-06-14 15:23:20 | eryksun | set | recipients:
+ eryksun, twouters, alanmcintyre, serhiy.storchaka, ldoktor |
2016-06-14 15:23:20 | eryksun | set | messageid: <1465917800.59.0.105049713065.issue27318@psf.upfronthosting.co.za> |
2016-06-14 15:23:20 | eryksun | link | issue27318 messages |
2016-06-14 15:23:20 | eryksun | create | |
|