Skip to content

Allow leading slash in root path of Zip file #502

@andrecadete

Description

@andrecadete

Hi,

For reasons out of my control (external partner) I have to create a zip with an explicit root path. Providing "/" as value of the Destination path or Prefix option does nothing, it seems to be removed by your library intentionally.

Below an output of the desired and produced result (also note the "documents" directory is for some reason also different in the "desired" result than the one produced by this library).

Desired:
example

Actual result:
result

The latter is naturally produced when adding a File to a zip and providing a leading slash in the destination name (i.e. "/filename.xml"), but I'm trying to migrate a few Java applications to serverless using Node (typescript) and this is the only show stopper. I've also looked around in all other decent zip libraries for node and none seems to be able to produce these zip contents.

Please confirm if there is no way to have this result with your library and if not:

  • Can this become a feature (request) and when could one expect it to be available? (to manage internal company expectations)
  • If it can't become a feature (request) can you point me out where I can change the code to allow this?

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions