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-24 16:36:27 +0200
commit8e1ec537b3bcebdde8e6e6703eb35c097b026461 (patch)
treeddde187ac7998c21963d483ff551eacaab986c15
parent37e5e6b7950e3540009728f3e67c2ec4addf8ba7 (diff)
downloadgvfs-8e1ec537b3bcebdde8e6e6703eb35c097b026461.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