Closed kimlimjustin closed 3 years ago
That should already be handled: https://github.com/sindresorhus/trash/blob/74bed3edf34826595cf4a990b01b2b9b10733238/lib/linux.js#L60-L61
Make sure you're on the latest version.
// @stroncium
Yes, it works on the latest version, thanks!
This package works fine for me at first, but when I tried to run it in a new system (Ubuntu in Virtualbox), I noticed that there's no
Trash
directory at.local/share
if the user never deleted any files, which causing an error. I think this can be fixed if we add a piece of code to check if the dir exists or otherwise create it. Thanks!