summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2018-07-24 14:57:14 +0200
committerOndrej Holy <oholy@redhat.com>2018-07-26 11:23:51 +0200
commit9299ed2620bbbe4b79c0835b25bc43b442d99942 (patch)
tree2eda3351368f5148aecb46b62344051f7f2102d7
parent957d9821ca516c7f9a5dc69888bbb1bec963ee31 (diff)
downloadgvfs-9299ed2620bbbe4b79c0835b25bc43b442d99942.tar.gz
smb: Do not claim that mountable can be unmounted
G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT is set to TRUE, but unmount_mountable() is not implemented. Set the attribute always to FALSE in order to prevent errors from g_file_unmount_mountable_with_operation(). Nautilus should seamleassly use g_mount_unmount_with_operation() if the attribute is set to FALSE. Closes: https://gitlab.gnome.org/GNOME/gvfs/issues/15
-rw-r--r--daemon/gvfsbackendsmbbrowse.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/daemon/gvfsbackendsmbbrowse.c b/daemon/gvfsbackendsmbbrowse.c
index 2ed6fd72..f08d2988 100644
--- a/daemon/gvfsbackendsmbbrowse.c
+++ b/daemon/gvfsbackendsmbbrowse.c
@@ -1277,15 +1277,10 @@ get_file_info_from_entry (GVfsBackendSmbBrowse *backend, BrowseEntry *entry, GFi
{
g_file_info_set_file_type (info, G_FILE_TYPE_MOUNTABLE);
if (g_mount_tracker_has_mount_spec (mount_tracker, mount_spec))
- {
- g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT, FALSE);
- g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT, TRUE);
- }
+ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT, FALSE);
else
- {
- g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT, TRUE);
- g_file_info_set_attribute_boolean(info, G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT, FALSE);
- }
+ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT, TRUE);
+ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT, FALSE);
g_mount_spec_unref (mount_spec);
}
else