diff options
author | Ondrej Holy <oholy@redhat.com> | 2018-07-31 18:43:44 +0200 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2018-08-16 15:35:54 +0200 |
commit | 799d2503e3a9f75dbc3011a28275e977640a7d79 (patch) | |
tree | 903dc70faa9dcf17905aad80f37ca0264be33d7f | |
parent | 7e619ad025445f226fdf7b30b8e3f9a90e164ab1 (diff) | |
download | gvfs-799d2503e3a9f75dbc3011a28275e977640a7d79.tar.gz |
google: Ignore entries without parents
Entries without parents are not shown on the web and there isn't any
reason to list them here. Such entries belongs to some web services
and we have no control over them.
-rw-r--r-- | daemon/gvfsbackendgoogle.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/daemon/gvfsbackendgoogle.c b/daemon/gvfsbackendgoogle.c index e9eaec1f..897df61f 100644 --- a/daemon/gvfsbackendgoogle.c +++ b/daemon/gvfsbackendgoogle.c @@ -347,14 +347,6 @@ get_parent_id (GVfsBackendGoogle *self, } } - if (ret_val == NULL) - { - const gchar *root_id; - - root_id = gdata_entry_get_id (self->root); - ret_val = g_strdup (root_id); - } - g_list_free (links); return ret_val; } @@ -903,10 +895,8 @@ build_file_info (GVfsBackendGoogle *self, { GFileType file_type; GList *authors; - GList *links; gboolean is_folder = FALSE; gboolean is_root = FALSE; - gboolean has_parent = FALSE; const gchar *etag; const gchar *id; const gchar *name; @@ -925,9 +915,6 @@ build_file_info (GVfsBackendGoogle *self, if (entry == self->root) is_root = TRUE; - links = gdata_entry_look_up_links (entry, GDATA_LINK_PARENT); - has_parent = (links != NULL); - g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME, !is_root); g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE, is_folder); @@ -936,9 +923,7 @@ build_file_info (GVfsBackendGoogle *self, g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE, is_symlink); g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH, FALSE); - g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE, !is_root && has_parent); - - g_file_info_set_is_hidden (info, !has_parent); + g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE, !is_root); if (is_folder) { @@ -1091,7 +1076,6 @@ build_file_info (GVfsBackendGoogle *self, g_free (copy_name); g_free (escaped_name); g_free (content_type); - g_list_free (links); } /* ---------------------------------------------------------------------------------------------------- */ |