[gvfs/gnome-3-28] afp: Do not claim that mountable can be unmounted



commit 957d9821ca516c7f9a5dc69888bbb1bec963ee31
Author: Ondrej Holy <oholy redhat com>
Date:   Tue Jul 24 14:47:45 2018 +0200

    afp: 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.
    
    https://gitlab.gnome.org/GNOME/gvfs/issues/15

 daemon/gvfsbackendafpbrowse.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/daemon/gvfsbackendafpbrowse.c b/daemon/gvfsbackendafpbrowse.c
index ee6d0ad9..a59160da 100644
--- a/daemon/gvfsbackendafpbrowse.c
+++ b/daemon/gvfsbackendafpbrowse.c
@@ -246,15 +246,10 @@ fill_info (GFileInfo *info, GVfsAfpVolumeData *vol_data, GVfsBackendAfpBrowse *a
   g_mount_spec_set (mount_spec, "user", afp_backend->logged_in_user);
 
   if (g_mount_tracker_has_mount_spec (afp_backend->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);
-  }
   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_UNMOUNT, FALSE);
   g_mount_spec_unref (mount_spec);
 
   uri = g_strdup_printf ("afp://%s/%s",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]