zip-archive icon indicating copy to clipboard operation
zip-archive copied to clipboard

Permissions are not preserved when unpacking (Windows)

Open neko-kai opened this issue 12 years ago • 4 comments

See http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute, for example.

neko-kai avatar Oct 12 '12 15:10 neko-kai

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

  1. http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute
  2. https://github.com/jgm/zip-archive/issues/6

jgm avatar Oct 12 '12 16:10 jgm

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.

neko-kai avatar Oct 12 '12 16:10 neko-kai

Addressed in https://github.com/jgm/zip-archive/pull/26

da-x avatar Feb 22 '16 06:02 da-x

Note that #26 only works for Posix, not Windows, so this issue should probably stay open.

jgm avatar Feb 22 '16 18:02 jgm