After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 603390 - Trash is neither emptied or queried upon sidebar eject and "Safely Remove Device"
Trash is neither emptied or queried upon sidebar eject and "Safely Remove Dev...
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: general
2.30.x
Other Linux
: Normal major
: ---
Assigned To: Bruce Cowan
Nautilus Maintainers
: 600835 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-11-30 16:34 UTC by Cornwall
Modified: 2021-06-18 15:29 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30


Attachments
Patch which uses nautilus-file-operations (4.85 KB, patch)
2010-05-25 02:46 UTC, Bruce Cowan
none Details | Review
v2 (5.81 KB, patch)
2010-05-26 15:04 UTC, Bruce Cowan
needs-work Details | Review

Description Cornwall 2009-11-30 16:34:32 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.
Comment 1 André Klapper 2009-12-10 22:12:07 UTC
So providing at least the name of your thumb drive is welcome...
Comment 2 Cornwall 2009-12-10 22:25:18 UTC
What?
Comment 3 Jim Braux-Zin 2010-03-24 18:06:00 UTC
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.
Comment 4 Cornwall 2010-04-17 19:15:02 UTC
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
Comment 5 Cosimo Cecchi 2010-04-30 00:09:21 UTC
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.
Comment 6 Cornwall 2010-05-01 02:33:47 UTC
Nautilus 2.30.0 still has the issue.
Comment 7 Cornwall 2010-05-01 02:34:19 UTC
Forgive me, I completely missed my comment already stating the above...
Comment 8 Cosimo Cecchi 2010-05-02 15:06:00 UTC
*** Bug 600835 has been marked as a duplicate of this bug. ***
Comment 9 Bruce Cowan 2010-05-25 02:46:29 UTC
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.
Comment 10 Bruce Cowan 2010-05-26 15:04:27 UTC
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().
Comment 11 Cosimo Cecchi 2010-07-04 14:21:07 UTC
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.
Comment 12 Bruce Cowan 2010-09-02 19:21:19 UTC
This appears to happen with 2.31.90.
Comment 13 scott092707 2013-12-14 21:45:44 UTC
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
Comment 14 André Klapper 2021-06-18 15:29:02 UTC
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.