Closed IgnoredAmbience closed 6 years ago
This is an excellent point. It should allow for this. I'd accept a PR doing so.
PS, sorry that you had these issues :(
Actually, I'm not sure why you had this problem.... https://github.com/jprichardson/node-klaw/blob/9d5a5b71a8f1bd872212cff31a6281cd82378450/src/index.js#L27 It's used lstat
from the beginning. Unless I'm misunderstanding the problem?
lstat
doesn't traverse links:
lstat() is identical to stat(), except that if path is a symbolic link, then the link itself is stat-ed, not the file that it refers to
Swapping lstat
for stat
should work, but would result in non-termination of the stream if there's any cycles in the tree.
Symblinks are still not being traversed.
Symblinks are still not being traversed. +1
Spent a while trying to work out why my directory tree wasn't being traversed -- my root path was a symlink which isn't traversed. It would be helpful to document explicitly that symlinks aren't traversed, or provide an option to permit this.