Skip to content

Commit d164bd5

Browse files
authored
feat: improve file cli tool support (#80)
with `toIum` `mimetype: application/zip`, `file` cli tool now detect `Zip data (MIME type "application/zip"?)` instead `Zip data (MIME type "application/zipN"?)` MacOS still unable to unarchive produced files. It has weird behavior with zip files containing `mimetype` uncompressed as first file entry. ``` printf 'application/zip' > mimetype printf 'Hello World!' > file.txt zip -0 -X zip-mimetype-X.zip mimetype file.txt ``` And macos is unable to extract this archive... Closes: #79 Refs: https://github.com/tpoisseau/repro-zip-js-macos-issue
1 parent 311c198 commit d164bd5

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/ium/to_ium.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,11 @@ export async function toIum(
8888
);
8989
await zipWriter.add('mimetype', new TextReader(mimetype), {
9090
compressionMethod: 0,
91-
dataDescriptor: false, // ensures the data length is written in the local file header
92-
extendedTimestamp: false, // smaller payload, the extra field is empty
91+
// ensures the data length is written in the local file header
92+
dataDescriptor: false,
93+
dataDescriptorSignature: false,
94+
// smaller payload, the extra field is empty
95+
extendedTimestamp: false,
9396
});
9497

9598
const sources: ToIumIndex['sources'] = [];

0 commit comments

Comments
 (0)