zip-archive
zip-archive copied to clipboard
Permissions are not preserved when unpacking (Windows)
See http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute, for example.
The internal and external file attributes are stored in the Archive data structure (eInternalFileAttributes :: Word16, eExternalFileAttributes :: Word32). But they are not parsed into a more informative structure, nor are they used in writeEntry.
I didn't need them for the application that prompted me to write zip-archive (pandoc), and the zip format specification didn't say enough about how the file attribute fields worked, so I left this out. I'd be happy to accept a patch that added support for this, though. (Just make sure to support Windows attributes as well as unix.)
+++ exbb2 [Oct 12 12 08:41 ]:
See [1]http://unix.stackexchange.com/questions/14705/the-zip-formats-extern al-file-attribute, for example.
-- Reply to this email directly or [2]view it on GitHub. [J6T91GIPIyhU-8ti4GCGP7AlC2fiocPKodp06RQqyLyCBw62W5u8Wf_FpirjxANV.gif]
References
- http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute
- https://github.com/jgm/zip-archive/issues/6
I'd be happy to accept a patch that added support for this, though. (Just make sure to support Windows attributes as well as unix.)
Right now i use a simple hack to set executable bits for my application, if I'll ever need more advanced functionality I'll write a patch for zip-archive. The issue most probably will remain unclosed as some kind of a milestone.
Addressed in https://github.com/jgm/zip-archive/pull/26
Note that #26 only works for Posix, not Windows, so this issue should probably stay open.