GNOME Bugzilla – Bug 310414
Don't allow to delete/trash home directory.
Last modified: 2005-08-22 21:19:40 UTC
Distribution/Version: mandriva cooker 0. In Preferences > Behavior, check the option to offer a Delete command that bypasses Trash. 1. Open the home directory in a spatial window. 2. Open the context menu for the folder button on the lower left. 3. Observe that 'Delete' and 'Trash' are both active menu items and that a Trash icon is displayed for both. 4. Open /home 5. Open the context menu of the home directory 6. Observe that 'Delete' and 'Trash' are disabled menu items and that a Trash icon is only displayed for Trash Delete and Trash are operations that shouldn't be performed on $HOME in 99,99% of the cases, so the context menu of the folder button should be consistent with the normal context menu. Also, a Trash icon next to Delete can be confusing and is a potential data loss risk.
Created attachment 49611 [details] [review] Proposed patch I've also submitted this patch to nautilus-list [1] for review. [1] http://mail.gnome.org/archives/nautilus-list/2005-July/msg00267.html
I don't think this patch fixes the problem that the location button context menu offers Trash/Delete for the users' home directory?
Right...the bug report subject doesn't match what the main point of your bug report was.
Still present in 2.11.91. May I point out that this is a bug that can lead to severe data loss?
Created attachment 50696 [details] [review] Proposed patch I've also submitted this patch to the nautilus mailing list [1] for review. [1] http://mail.gnome.org/archives/nautilus-list/2005-August/msg00133.html
2005-08-22 Martin Wehner <martin.wehner@gmail.com> * libnautilus-private/nautilus-file.c: (nautilus_file_is_desktop_directory), (nautilus_file_can_rename), (prepend_automatic_emblem_names): * libnautilus-private/nautilus-file.h: * src/file-manager/fm-directory-view.c: (desktop_or_home_dir_in_selection), (real_update_location_menu), (real_update_menus): Don't allow trashing or deleting the home or desktop folder within a selection or via the location button context menu. Fixes #310414. Based on a patch from Christian Neumair <chris@gnome-de.org>