Broken symlinks are silently ignored
jdanford opened this issue · 3 comments
jdanford commented
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 commented
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 commented
That's what I was thinking – should I go ahead and submit a PR?
sindresorhus commented
Yes :)