GNOME Bugzilla – Bug 535812
Emptying trash does not always honour the "Ask me" preference
Last modified: 2008-05-31 13:01:57 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.
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.
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).