soldair / node-walkdir

Walk a directory tree emitting events based on the contents. API compatable with node-findit. Walk a tree of any depth. Fast! Handles permission errors. Stoppable. windows support. Pull requests are awesome. watchers are appreciated.
MIT License
131 stars 22 forks source link

Not following symlink #46

Open swisstackle opened 2 years ago

swisstackle commented 2 years ago

My filestructure is the following: https://github.com/swisstackle/pr/blob/master/filestructureuml.png

My call is the following: const results = walkdir.sync(fileOrDir, { follow_symlinks: true });

where fileOrDir is the test directory.

However, for some reason it does not add "Random.sol" to the results list. Random.sol is linked through a symlink and the file lies outside of the test directory (but is linked from the test directory through "symlink3.").

What could the problem be? If more information is needed, let me know.

swisstackle commented 2 years ago

I figured out that the asynchronous walkdir.walk finds the file outside the test directory, but walkdir.sync does not.