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

fs.lstat not recognizing symbolic link #4178

Closed
kklas opened this issue Dec 7, 2015 · 2 comments
Closed

fs.lstat not recognizing symbolic link #4178

kklas opened this issue Dec 7, 2015 · 2 comments
Labels
fs Issues and PRs related to the fs subsystem / file system.

Comments

@kklas
Copy link

kklas commented Dec 7, 2015

When I use fs.lstat on a symlink to a directory with a slash appended on the end of the path like this: fs.lstat('directory/', function(err, stat) {....
stat.isSymbolicLink() returns false and .isDirectory() returns true.

Without the slash (eg. 'directory') it reports the link like I would expect it to.
This is v5.1.1 on linux.

Is this normal behavior?

@mscdex mscdex added the fs Issues and PRs related to the fs subsystem / file system. label Dec 7, 2015
@bnoordhuis
Copy link
Member

In a word: yes. Appending the slash dereferences the symbolic link. The stat(1) tool exhibits the same behavior.

@mscdex
Copy link
Contributor

mscdex commented Dec 7, 2015

For reference: see here and the trailing slashes section from here.

szkl added a commit to szkl/miniflare that referenced this issue Mar 11, 2022
The changes in nodejs/node#4178 (which
released in node v17.7.0) makes the [type
check](https://github.com/nodejs/node/blob/master/lib/internal/crypto/webcrypto.js#L701-L703)
on `this` in the internal `crypto` module fail.
mrbbot pushed a commit to cloudflare/miniflare that referenced this issue Mar 30, 2022
The changes in nodejs/node#4178 (which
released in node v17.7.0) makes the [type
check](https://github.com/nodejs/node/blob/master/lib/internal/crypto/webcrypto.js#L701-L703)
on `this` in the internal `crypto` module fail.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fs Issues and PRs related to the fs subsystem / file system.
Projects
None yet
Development

No branches or pull requests

3 participants