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

exists doesn't respect relative symlinks #414

Closed
timvahlbrock opened this issue Feb 3, 2025 · 2 comments
Closed

exists doesn't respect relative symlinks #414

timvahlbrock opened this issue Feb 3, 2025 · 2 comments

Comments

@timvahlbrock
Copy link
Contributor

In the example for creating symlinks in the README, one would expect that fs.existsSync("/some/dir/a-symlink") returns true, but it actually returns false, because exists expects absolute symlink paths. It probably needs a path.resolve, like the open implementation.

@timvahlbrock
Copy link
Contributor Author

Added a pull request with fix and a test

@tschaub
Copy link
Owner

tschaub commented Feb 6, 2025

Thanks, @timvahlbrock. Fix is included in the v5.5.0 release.

@tschaub tschaub closed this as completed Feb 6, 2025
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

2 participants