kamiyaa / joshuto

ranger-like terminal file manager written in Rust
https://crates.io/crates/joshuto
GNU Lesser General Public License v3.0
3.4k stars 150 forks source link

"Unknown error" when trying to move some elements to trash in a specific path #386

Closed xfzv closed 1 year ago

xfzv commented 1 year ago

I use Gentoo as my main distro but also have Arch Linux installed on another SSD, which is permanently mounted to /media/Arch via /etc/fstab.

When navigating to /media/Arch/home/ (this dir + my actual user dir) with joshuto, I can create files/dirs just fine with "ft" and "mk", but I cannot move them to trash with either "delete" or "dd". I'm getting "Unknown error" printed at the bottom left corner of joshuto window.

I have other disks mounted to /media/ (with correct permissions too) but couldn't reproduce the issue from these mount points. Both creating and moving files/dirs to trash work fine from there with joshuto.

Moving files from /media/Arch/home/* to trash with Dolphin works just fine as well.

Direct deletion with use_trash = false works as expected in /media/Arch/home/*.

xfzv commented 1 year ago

Nevermind, I missed this:

https://github.com/kamiyaa/joshuto/blob/48e42e21dd0c0774cdee649b2134a12ea9c5960e/docs/configuration/keymap.toml.md?plain=1#L274-L275

Feel free to close. :disguised_face:

kamiyaa commented 1 year ago

While this issue is known and documented, it shouldn't necessarily be a problem. I can look into potential solutions

kamiyaa commented 1 year ago

With f9ebd1055b916532e307e1b64be296d74e760d0b

Instead of using a library, Joshuto now runs external commands to try and delete files. gio trash will still fail because it does not support deleting on internally mounted filesystems.

However, you should be able to delete files from mount filesystems with the trash-cli command installed. https://github.com/andreafrancia/trash-cli

xfzv commented 1 year ago

With f9ebd10

Instead of using a library, Joshuto now runs external commands to try and delete files. gio trash will still fail because it does not support deleting on internally mounted filesystems.

However, you should be able to delete files from mount filesystems with the trash-cli command installed. https://github.com/andreafrancia/trash-cli

Can confirm f9ebd1055b916532e307e1b64be296d74e760d0b solves the issue on my end, deleting from /media/Arch/home/ works as expected with use_trash = true (and yes, I'm using trash-cli).

Thank you!