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

lstat/lstatSync throws an error when called on a non-symbolic link #14

Closed
eugirdor opened this issue Jun 12, 2015 · 0 comments
Closed

Comments

@eugirdor
Copy link
Contributor

As seen here an error is thrown if you attempt to lstat() a file that is not a symbolic link. That doesn't appear to be the correct behavior. According to the fs.lstat documentation:

Asynchronous lstat(2). The callback gets two arguments (err, stats) where stats is a fs.Stats object.
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.

The result for a non-symbolic link should be the same as stat().

I am not sure if this is an issue with any other method.

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