Closed erikjalevik closed 6 months ago
yauzl doesn't extract files; it enables other software to extract files. if the extended attributes you're looking for are encoded the zipfile somewhere, they should be availble to whatever software is writing to the file system, probably in the extraFields
field.
Check out examples/dump.js
or examples/compareCentralAndLocalHeaders.js
for tools to examine a zipfile's extraFields
.
Please reopen if this doesn't point you in the right direction.
Thanks for the reply. Yes, there is indeed some data present under the extraFields
property, however it's just a Buffer
with 32 bytes, and I'd have no idea how to parse it into something resembling the extended attributes.
But I'm guessing this is outside the scope of yauzl.
On MacOS, some files have extended attributes (viewable with
xattr -l
). These don't seem to be preserved when unzipping with yauzl.One case where this is important is when downloading an app embedded in a zip file, the Linear installer is one example. If unzipping this by double-clicking it in Finder, the extracted file has
com.apple.macl
,com.apple.quarantine
andcom.apple.provenance
attributes. But if unzipping it using yauzl, these attributes are lost. Without them, MacOS refuses to launch the app, producing an error:Any thoughts on whether there's a way to preserve these when using yauzl to unzip?