Skip to content

Specific uscase error: empty dir in zip archive #107

Open
@vladblindu

Description

@vladblindu

Hi there,

This is not an issue but more of a specific usecase fix.

I encountered an error (ENOENT) when the a zip file contains an empty dir. The problem might be generated by the zipping utility, because the type field id set to file instead of dir.

Changing this line to:

if (x.type === 'directory' || x.path.endsWith('/')) {

solves the problem.

It looks like nobody else had this issue so I'm posting it this just in case someone, in the future might have the same problem as I did. My specific use case is related to the unzipping of a Writerside created archive. There is an empty resources folder (probably is only empty in this specific situation) that is included in the archive but errors on extraction.

Thank you all for your time and effort.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions