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 310414 - Don't allow to delete/trash home directory.
Don't allow to delete/trash home directory.
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File and Folder Operations
2.11.x
Other All
: Normal normal
: 2.12.x
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-07-14 21:10 UTC by Reinout van Schouwen
Modified: 2005-08-22 21:19 UTC
See Also:
GNOME target: 2.12.x
GNOME version: 2.11/2.12


Attachments
Proposed patch (1023 bytes, patch)
2005-07-23 12:08 UTC, Christian Neumair
committed Details | Review
Proposed patch (4.89 KB, patch)
2005-08-14 18:32 UTC, Christian Neumair
none Details | Review

Description Reinout van Schouwen 2005-07-14 21:10:00 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.
Comment 1 Christian Neumair 2005-07-23 12:08:00 UTC
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
Comment 2 Reinout van Schouwen 2005-07-27 09:02:07 UTC
I don't think this patch fixes the problem that the location button context menu
offers Trash/Delete for the users' home directory?
Comment 3 Christian Neumair 2005-07-27 09:51:45 UTC
Right...the bug report subject doesn't match what the main point of your bug
report was.
Comment 4 Reinout van Schouwen 2005-08-14 15:40:14 UTC
Still present in 2.11.91. May I point out that this is a bug that can lead to
severe data loss?
Comment 5 Christian Neumair 2005-08-14 18:32:42 UTC
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
Comment 6 Martin Wehner 2005-08-22 21:19:40 UTC
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>