andreafrancia / trash-cli

Command line interface to the freedesktop.org trashcan.
GNU General Public License v2.0
3.63k stars 177 forks source link

trash-put: Compatability with Windows Subsystem for Linux (WSL) #150

Open zzzachzzz opened 5 years ago

zzzachzzz commented 5 years ago

When using trash-cli in Ubuntu with WSL, trash-put places the trash in different locations depending on if you're within the Ubuntu filesystem, or a Windows directory that is being mounted for access. I understand this is intended for external devices that are mounted, but it would be nice to force a single trash location. With my setup, I have 3 that have been created: /mnt/c/.Trash-1000, /mnt/d/.Trash-1000, and ~/.local/share/Trash. I'd be open to creating a PR with whatever the preferred solution would be but I noticed this project has been a bit inactive.

zzzachzzz commented 3 years ago

For anyone interested in a solution, I made a small change on a fork that effectively forces a single trash location, by removing a check that compares the volume of the file to be trashed with the volume of the trash directory. You can see that diff here: https://github.com/zzzachzzz/trash-cli/commit/d420892bd80154de91db3772d473c58d409427f2 After making the change yourself or cloning my fork, you can then go through the instructions in the readme to install trash-cli from source: https://github.com/andreafrancia/trash-cli#from-sources

kohane27 commented 3 years ago

Thank you opening this issue and providing a quick fix. I was having the exact same issue and was wondering where the trash went. After making the changes you suggested, now all the trash goes to ~/.local/share/Trash

Thanks again 👍