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 535812 - Emptying trash does not always honour the "Ask me" preference
Emptying trash does not always honour the "Ask me" preference
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Trash
2.22.x
Other Linux
: Normal critical
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-30 17:03 UTC by Kai Willadsen
Modified: 2008-05-31 13:01 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Add a call to setup_autos() in nautilus_file_operations_empty_trash (538 bytes, patch)
2008-05-30 17:06 UTC, Kai Willadsen
committed Details | Review

Description Kai Willadsen 2008-05-30 17:03:44 UTC
Sometimes (more details below) when emptying the trash, nautilus will not ask for confirmation, even though the "Ask before emptying..." preference is checked.

To reproduce:
* Put a file in the trash
* Restart (kill nautilus, logout, ...?)
* Get back to desktop, open trash, and empty it
-> No confirmation dialog is shown.

This will *not* happen if anything has been deleted or moved into the trash since nautilus restarted. The cause seems to be that the preference is loaded in setup_autos(), which is only called from the trash_or_delete/delete operations in nautilus-file-operations.c, and not from the empty_trash operation.
Comment 1 Kai Willadsen 2008-05-30 17:06:31 UTC
Created attachment 111812 [details] [review]
Add a call to setup_autos() in nautilus_file_operations_empty_trash

This patch fixes the bug for me by calling setup_autos() in nautilus_file_operations_empty_trash(), so that the preference is initialised.
Comment 2 Cosimo Cecchi 2008-05-31 13:01:57 UTC
Thanks for the patch, it looks definitely right to me. I committed it to trunk and gnome-2-22 branch, closing as FIXED.

2008-05-31  Cosimo Cecchi  <cosimoc@gnome.org>

	* libnautilus-private/nautilus-file-operations.c:
	(nautilus_file_operations_empty_trash):
	Call setup_autos() to have the confirmation preference var
	always initializated properly. Patch by Kai Willadsen (#535182).