Skip to content

Cannot overwrite existing directory if symlink present (OSX) #20

@marwanhilmi

Description

@marwanhilmi

Let's say I have x.zip with contains a symlink and I unzip the first time to /foo.
If I try to unzip the same zip (or another zip containing the same symlink) to /foo it will fail with EEXIST. Regular files overwrite as expected (ie fs.writestream by default will overwrite). Unfortunately fs.symlink fails if the symlink already exists.

I can make a PR but do you have any suggestions on how to proceed?
I was thinking we check if the symlink already exists and delete before creating the new symlink.

Furthermore - should overwrite be set by flag (for the regular files as well)?

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