Skip to content
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

Exception thrown when directory contains broken symlink. #17

Open
c0d3d opened this issue Nov 9, 2020 · 0 comments
Open

Exception thrown when directory contains broken symlink. #17

c0d3d opened this issue Nov 9, 2020 · 0 comments

Comments

@c0d3d
Copy link

c0d3d commented Nov 9, 2020

Right now, the code uses statSync, but this attempts to read through symlinks, and will throw ENOENT for any broken symlinks.

IMO, this call should be lstatSync as it gives users more control (and also doesn't throw exceptions if the link is broken).

I found this will using a library that depends on klawSync, I wasn't aware that there was a broken symlink in the directory, but nonetheless I don't think the library should assume that users always want to read through symlinks. It would be better to let the user library break and they can deal with it accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant