mihneadb / node-directory-tree

Convert a directory tree to a JS object.
MIT License
523 stars 106 forks source link

onEachDirectory callbacks only top level directory #57

Open hados99 opened 5 years ago

hados99 commented 5 years ago

Hi, really thanks for good library.

When testing onEachDirectory callback, it only returns top level directory. I tested on nodejs v10, directory-tree v2.2.0, installed via npm.

I think onEachDirectory callback parameter is missing when calling directoryTree recursively.

https://github.com/mihneadb/node-directory-tree/blob/5f2db2932a798ce728337cb0c7aab039afc91d70/lib/directory-tree.js#L99

mihneadb commented 5 years ago

Hi, good find! Feel free to submit a PR :).