adm-zip icon indicating copy to clipboard operation
adm-zip copied to clipboard

Zipping a folder with symlinks causes ENAMETOOLONG

Open iurii-iufimov-forgood opened this issue 1 year ago • 0 comments

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...

iurii-iufimov-forgood avatar Sep 17 '24 16:09 iurii-iufimov-forgood