32 lines
1.2 KiB
Diff
32 lines
1.2 KiB
Diff
|
From a0c8d67cfea614c8c920af7c4ce2d90e4ce7256f Mon Sep 17 00:00:00 2001
|
||
|
From: Tomas Bzatek <tbzatek@redhat.com>
|
||
|
Date: Fri, 2 Oct 2009 15:05:44 +0200
|
||
|
Subject: [PATCH 1/3] Disallow mounting empty drives
|
||
|
|
||
|
This concerns only removable media drives without any detected volumes.
|
||
|
The end result is no Mount item in Nautilus popup menu and no action taken
|
||
|
on double-click over the drive icon.
|
||
|
|
||
|
The exception is floppy drives, where we always allow mount without need
|
||
|
to detecting media manually first.
|
||
|
---
|
||
|
daemon/gvfsbackendcomputer.c | 2 +-
|
||
|
1 files changed, 1 insertions(+), 1 deletions(-)
|
||
|
|
||
|
diff --git a/daemon/gvfsbackendcomputer.c b/daemon/gvfsbackendcomputer.c
|
||
|
index 4f4b9ca..59eadba 100644
|
||
|
--- a/daemon/gvfsbackendcomputer.c
|
||
|
+++ b/daemon/gvfsbackendcomputer.c
|
||
|
@@ -473,7 +473,7 @@ recompute_files (GVfsBackendComputer *backend)
|
||
|
file->icon = g_drive_get_icon (file->drive);
|
||
|
file->display_name = g_drive_get_name (file->drive);
|
||
|
file->can_eject = g_drive_can_eject (file->drive);
|
||
|
- file->can_mount = TRUE;
|
||
|
+ file->can_mount = ! g_drive_is_media_removable (file->drive) || ! g_drive_is_media_check_automatic (file->drive) || g_drive_has_media (file->drive);
|
||
|
}
|
||
|
|
||
|
if (file->drive)
|
||
|
--
|
||
|
1.6.5.rc2
|
||
|
|