GNOME Bugzilla – Bug 603390
Trash is neither emptied or queried upon sidebar eject and "Safely Remove Device"
Last modified: 2021-06-18 15:29:02 UTC
My thumb drive will not have the trash emptied when I click on the "Eject" icon in the sidebar, and it does not ask me either. The same behavior occurs when I right click on the drive and select "safely remove device". However, the context entry, "Eject", does present a dialog asking if I would like to empty the trash. The result of this is a thumb drive that would eventually get so full that it would be unusable to the unknowing user. So I am marking as Major.
So providing at least the name of your thumb drive is welcome...
What?
I had this bug with Ubuntu Karmic but since I upgraded to Lucid with nautilus version 2.29.92 everything seems to work as it should.
using GNOME 2.30, and the bug is still present. I created a file on the thumb drive, unmounted it, mounted it again, deleted it, and there was no confirmation. After remounting the drive, the file could be found in .Trash-1000
This is probably because that sidebar code uses GIO directly instead of passing through the nautilus-file-operations code that spawns the empty trash dialog.
Nautilus 2.30.0 still has the issue.
Forgive me, I completely missed my comment already stating the above...
*** Bug 600835 has been marked as a duplicate of this bug. ***
Created attachment 161905 [details] [review] Patch which uses nautilus-file-operations This patch makes the button use the nautilus_file_operations_unmount_mount_full function instead of GIO directly. I'm not sure if that's a good idea, but it appears to fix this problem.
Created attachment 162023 [details] [review] v2 This one gets rid of seperate unmount and eject functions, as they are almost the same apart from one boolean passed to nautilus_file_operations_unmount_mount_full().
Review of attachment 162023 [details] [review]: You can't always assume a GMount will be there and not a GDrive or a GVolume, that's why e.g. check_unmount_and_eject() takes all three into consideration. What you should do is to have a new set of nautilus_file_operations_eject_* functions with the right parameter types. Also, the same wrapper should probably be done for stop operations, otherwise you're still missing some cases.
This appears to happen with 2.31.90.
As of 2013-12-14, with Nautilus version 3.8.2, and now only an "Eject" option, the situation is the same: Whether using the eject button next to the device name, or "Eject" from the right-click context menu, Nautilus does not offer to empty the trash. ------------------------------- scott@scott-ASUS-M2N68-AM-PLUS:~$ uname -a Linux scott-ASUS-M2N68-AM-PLUS 3.11.0-13-generic-tuxonice #20~ppa1-Ubuntu SMP Fri Nov 8 11:40:45 UTC 2013 i686 athlon i686 GNU/Linux scott@scott-ASUS-M2N68-AM-PLUS:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 13.10 Release: 13.10 Codename: saucy [This is actually Lubuntu] scott@scott-ASUS-M2N68-AM-PLUS:~$ nautilus --version GNOME nautilus 3.8.2
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of Files (nautilus), then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/nautilus/-/issues/ Thank you for your understanding and your help.