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

Broken symlinks are silently ignored #63

Closed
jdanford opened this issue Oct 8, 2017 · 3 comments
Closed

Broken symlinks are silently ignored #63

jdanford opened this issue Oct 8, 2017 · 3 comments

Comments

@jdanford
Copy link
Contributor

jdanford commented Oct 8, 2017

As the title says, the trash function silently ignores broken symlinks (because fs.existsSync returns false), whereas https://github.com/sindresorhus/macos-trash handles them as expected, i.e. moving them to the Trash. Is the former behavior intentional?

@sindresorhus
Copy link
Owner

I don't remember exactly why we're doing it in the first place, but I think it's so not to error on non-existing paths. Relevant commit: 34e4d71

I guess we could use fs.lstatSync() instead to support broken symlinks.

@jdanford
Copy link
Contributor Author

That's what I was thinking – should I go ahead and submit a PR?

@sindresorhus
Copy link
Owner

Yes :)

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