File deletion bypasses trash bin on Btrfs subvolumes
4
votes
1
answer
1195
views
Nautilus trash do not move file to trash bin on btrfs file system
instead it deletes them permanently. Thunar seems to do the same thing,
and it seems related to lower level library implementation of the trash
bin.
I added a new directory
~/.local/share/Trash/
that allows the file
manager Nautilus and Thunar to use the trash bin however it works only
for deletion that occurs from the same subvolume. Trashing from any
other btrfs subvolume or partition triggers permanent deletion.
Calibre, the ebook library manager, has a different behavior. My calibre
library is on a different subvolume than my home. When I delete books
from the Calibre manager, it moves the books to a hidden directory
.Trash-1000
under the root of the subvolume where the Calibre library
is stored. However this hidden directory is not taken into account by
the trash bin therefore the books stay hidden occupying space until I
finally discovered them by chance. I don't think Calibre is wrong here
because it looks like the way trash bins are managed on external media
in ext3/4 file system.
Emacs function (delete-file)
manage to use the trash bin for different
subvolumes and even more amazing it uses the trash bin
~/.local/share/Trash/
for other partition on different disks. So it
does the job perfectly.
- Do you know a desktop file manager than could work with the trash
bin across different btrfs subvolume ?
- Do you know a way to prevent some softwares such as calibre to move
the files to a hidden spot while you think they are deleted ?
- It seems the libraries gvfs and glib/gio are used to manage the trash bin. The
softwares I mentioned are all calling different OS functions when it comes
to file deletion and the result is not consistent. Anyone has tracks about how
trash bins could be managed correctly ?
As far as my research goes, the problem seems to be older than 5 years
https://bugs.launchpad.net/glib/+bug/1442649 I have been using btrfs for a long
time with this downside, but I am curious to see how other people deal with this
problem especially since btrfs becomes more popular and seems to be proposed in
some linux distribution installer.
GNU/Linux 5.15.2-2 Manjaro Gnome: 41.1
Asked by Émilien
(81 rep)
Dec 8, 2021, 12:08 PM
Last activity: Oct 16, 2024, 06:14 AM
Last activity: Oct 16, 2024, 06:14 AM