Skip to content

can't call the unzipper.extract from callback of unzipper.on('list', cb) #60

@trosemann

Description

@trosemann

I want to decompress my archive only if there is a certain file inside. So i call unzipper.list() and check the files in unzipper.on('list')

unzipper.on('list', (files) => { if(fileFound(files){ unzipper.extract({path: folderPath}); }) });

If I do it like that, I got the following error:
"fd must be a file descriptor"

If I just call unzipper.extract() from outside the 'list' event, it works fine.

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