Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support directory symlinks #68

Closed
wants to merge 1 commit into from

Conversation

leemhenson
Copy link

Hi.

I've been trying to create a zip file through archiver but was struggling to get the zip.symlink(linkPath, sourcePath) to work for directory symlinks. It turns out that zip-stream needs to work slightly differently in this situation: the mode needs to include 755. I've switched this behaviour in if the data being supplied indicates that it's a directory symlink via the presence of a / suffix on the name and the linkname. An alternative approach would be to add another boolean (isDirectorySymlink or similar), but I didn't want to increase the api surface area.

I've added a test which generates a zip with a directory symlink in it - it seems to work ok for me when I unzip it.

@leemhenson
Copy link
Author

Closing in favour of archiverjs/node-archiver#469

@leemhenson leemhenson closed this Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant