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
Support Trash folders on alternate drives/partitions #2
Comments
Only OpenBSD lacks procfs, if you are concerned about that. We'd probably take a |
I have a If you decide to write one yourself, make sure to unescape the paths. A more portable alternative may be to walk up the directory hierarchy until
|
The immediate problem with this approach would be introducing different behaviors on different OSes, and the separate code paths to go with. And I feel like doing this even for one OS opens the can of worms. and suddenly there's justification for platform-specific
Thanks for sharing this, could be very helpful!
This could be a very good way to work around parsing |
Two possible workaround that I've come up with are:
One or both of these could be a good stopgap at least. |
Added support for setting the trash directory via the environment variable TRASH_D_DIR. Related to #2
Closing this as being largely fixed in version 15 as part of #5 |
This is a follow-up to #1
Currently
trash-d
will copy a file into the user's home trash folder when trashing a file on a different drive/partition. This isn't great from a speed and space perspective, nor from a compatibility one (though it is spec-compliant).A future version of
trash-d
could enumerate/proc/mounts
(or some other facility if D has one) to find out what device it is on, then use that information to find and use a.Trash
folder on that device.However this also poses a number of UX issues.
trash --list
would have to find and list the trash on every single device,trash --empty
now has the potential for considerably more unintended damage.trash --del
andtrash --restore
are now ambiguous if you have 2 files with the same name across different drives.In addition to all this, it could substantially complicate
trash-d
's code since there would no longer be a single known trash directory. It could also possibly tie it even more tightly to Linux, and I would like to support the BSDs which would complicate things further.This issue is for discussing the future of this feature, and in general determining whether or not it is worth doing. So questions, comments, and suggestions are welcome!
The text was updated successfully, but these errors were encountered: