-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] generate UNIX extra fields #194
Comments
The unix permissions are stored in the "external file attributes" (this link was really useful). Generating / parsing this field is easy but we need to be careful with what we allow in the API. I though that a field Moreover the DOS files attributes are still used (I'm still investigating the windows ACL support) : we could support them too. If I follow wikipedia, Info-ZIP does a mapping between the two which can lead to broken things so I'd rather not try to mix them together. I suggest the follow API :
The other solution I see is to completely expose the "external file attributes" : easier for us but the user will need to know exactly how to generate it. |
Two new fields on ZipObject, `unixPermissions` and `dosPermissions`, hold the UNIX or DOS permissions of the file. A new option of `generate()`, `platform` (DOS or UNIX) controls the use of the permissions. The default behavior is to generate DOS archives, without any permissions, like before. Bonus side-effect : Finder on mac doesn't use the DOS directory flag, JSZip didn't properly recognize folders until now. Fix Stuk#194 and Stuk#198.
Keeping the "version made by" flag in the directory record to "DOS" sounds good, but we lack a way to change it to "UNIX" for example and add extra fields to set the unix permissions. Setting executable files will be useful, see sindresorhus/gulp-zip#38.
The field "external file attributes" will also need some investigations (when generating or parsing) as it depends on the "version made by" field.
The text was updated successfully, but these errors were encountered: