Skip to content

Creation of a zip file with no files or folders in it never triggers on 'close' #57

Closed

Description

@saadtazi

Hi,
I am not sure if it is a bug or expected behaviour in 0.5, but the following code behaves differently in 0.4 and 0.5.0:

var fs = require('fs'),
    archiver = require('archiver');

function go() {

  var zipStream = fs.createWriteStream('./profile.zip'),
    archive = archiver('zip', { forceUTC: true });

  zipStream.on('close', function() {
  console.log('ok, created');
  });
  archive.pipe(zipStream);

  archive.finalize();
}

go();

In 0.4, on 'close' is called, but not with 0.5. Note that the zip is created.

(I know that creating an empty zip file seems weird... It's just a test scenario actually)

Activity

  1. ctalkington commented on Jan 12, 2014

    @ctalkington
    Member

    noted. will review first chance.

  2. ctalkington commented on Jan 15, 2014

    @ctalkington
    Member

    v0.5.1 has been published. let me know if that doesn't fix it.

  3. saadtazi commented on Jan 16, 2014

    @saadtazi
    Author

    It is fixed! Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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