Closed gurgalex closed 5 years ago
@Davejkane
All that's left is MacOS trash support, which seems like it may be the most difficult to get bindings working for. Could default to just moving files to a user specified folder as a stopgap.
@Davejkane
I've got OS specifc trash support implemented for Linux, Windows, and Mac OS.
Do we still need the cli arg for specifying a trash folder?
@gurgalex Sorry I've been on vacation. Still am actually. But having a look at this now.
@Davejkane I went with an error message while trying to trash a file.
With this method, no crash will occur if the trash
binary is moved or deleted while riv
is running.
Plus, riv
doesn't need to be restarted to get trash support working again.
One piece at a time.
In pursuit of #66
[x] Linux
Accomplished through development of https://github.com/gurgalex/trash Added version
0.1.0
as a git dependency to the project.Currently only correctly moves files/directories and updates the trash info in
$XDG_DATA_HOME/Trash
directory. Supports non-utf8 file paths.It does not implement anything else from the spec. https://specifications.freedesktop.org/trash-spec/trashspec-1.0.html
[x] MacOS
Uses
trash
program from brew to move files to the trash.[x] Windows 10
Had to use the depreciated ShFileOperationW API since winapi
0.3.7
does not implement the newIFileOperation
API since Windows Vista.