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

Zipping a folder with symlinks causes ENAMETOOLONG #541

Open
iurii-iufimov-forgood opened this issue Sep 17, 2024 · 0 comments
Open

Zipping a folder with symlinks causes ENAMETOOLONG #541

iurii-iufimov-forgood opened this issue Sep 17, 2024 · 0 comments

Comments

@iurii-iufimov-forgood
Copy link

iurii-iufimov-forgood commented Sep 17, 2024

I'm trying to run addLocalFolder on a folder which contains recursive symbolic links

I have a JS project, that utilises yarn workspaces and has a following structure:

root
|-> worskpace-a
    |-> node_modules
        |-> worskpace-a (symlink to higher folder)

Trying to run addLocalFolder on such folder results in ENAMETOOLONG error and that's totally understandable.

What I believe is an issue, is that fact, that filter function doesn't prevent this: all reachable files are collected before filter is used:
https://github.com/cthackers/adm-zip/blob/master/adm-zip.js#L389

Maybe addLocalFolder should support some filter for parsed folders, not only files...

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

No branches or pull requests

1 participant