Closed jdanford closed 6 years ago
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: https://github.com/sindresorhus/trash/commit/34e4d71f7779f2b5406eb3e0b20cd5ea5ebed149
I guess we could use fs.lstatSync()
instead to support broken symlinks.
That's what I was thinking – should I go ahead and submit a PR?
Yes :)
As the title says, the
trash
function silently ignores broken symlinks (becausefs.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?