-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Follow symlinks in readdir() and readdirSync() #56
Conversation
Let me know if the indentation style used in tests aren't to your linking, not sure if the linter rules will complain if they're not. This patch will resolve symlinks in the same way |
This isn't quite ready yet |
This feels okay now |
var name; | ||
for (var i = 0, ii = parts.length; i < ii; ++i) { | ||
name = parts[i]; | ||
if (item instanceof SymbolicLink) { | ||
// Symbolic link being traversed as a directory | ||
linkPath = path.resolve(path.dirname(itemPath), item.getPath()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there might be an issue here with <link> -> <link> -> <file>
-type paths or something
Thanks for this @caitp! It looks like there might be more work needed to recursively follow links, but I think this is a nice enhancement. |
Follow symlinks in readdir() and readdirSync().
Published as |
I sent a followup with a bit more work on this portion --- I believe this matches the typical posix/libc behaviour, but I need to check that as it's been a while |
Closes #14