[issue3394] zipfile.writestr doesn't set external attributes, so files are extracted mode 000 on Unix

2008-07-18 Thread Christopher Brannon
Christopher Brannon [EMAIL PROTECTED] added the comment: Here is a patch containing code and a unit test. I set external_attr to 0600, for the following reason. When I extract with Infozip, my umask is ignored when setting permissions of extracted entries. They have the permissions assigned

[issue3394] zipfile.writestr doesn't set external attributes, so files are extracted mode 000 on Unix

2008-07-17 Thread Christopher Brannon
Christopher Brannon [EMAIL PROTECTED] added the comment: What value should the new archive entry's external_attr attribute have? ZipFile.write sets it to the permissions of the file being archived, but writestr is archiving a string, not a file. Setting it to 0600 lt;lt; 16 seems reasonable