Skip to content

Corrupt zip creation #91

@dralletje

Description

@dralletje

Hello,

When creating a zip with append and then pipe'in it into the unzip module (https://www.npmjs.org/package/unzip) gives this error: "invalid signature: 0xb87c42c0"
With the hex part changing every time.
Also my unzip program occasionally refuses to open it, also with an error.

I have the following, pretty simple, code to generate the zip (It is coffeescript but I think you'll understand):

archiver = require 'archiver'
archive = archiver 'zip'

archive.on 'error', (err) ->
  console.log "Archiverrrr:\n", err.stack

archive.append 'File content', name: 'file.txt'
archive.finalize()

When I pipe that into a fs.createWriteStream and try to open it or I pipe it into unzip.Parse from the unzip module, it gives a error. Archiver itself does not give an error.
This issues arises with both the npm and the latest git build.

Thanks for reading!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions