adm-zip
adm-zip copied to clipboard
Zipping a folder with symlinks causes ENAMETOOLONG
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...