Skip to content

Strip option causing error #50

@BigFunger

Description

@BigFunger

When i specify a strip option, I get the following error:

[TypeError: Cannot read property 'path' of undefined]

The code that generates the error is below:

var DecompressZip = require('decompress-zip');

var sourcePath = './My-Archive.zip';
var targetPath = './temp';
var unzipper = new DecompressZip(sourcePath);

unzipper.on('error', function (err) {
    console.log('Caught an error');
    console.log(err);
});

unzipper.on('progress', function (fileIndex, fileCount) {
    console.log('Extracted file ' + (fileIndex + 1) + ' of ' + fileCount);
});

unzipper.extract({
  path: targetPath,
  filter: function (file) {
    return file.type !== 'SymbolicLink';
  },
  strip: 1
});

The My-Archive.zip file I am using can be downloaded from here:
https://s3.amazonaws.com/jimtars/My-Archive.zip

The zip file was created using 7zip on Windows 8.1.

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