summaryrefslogtreecommitdiff
path: root/daemon/gvfsbackendgoogle.c
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2018-07-31 18:43:44 +0200
committerOndrej Holy <oholy@redhat.com>2018-09-21 11:30:17 +0000
commit014a3d9edea522d460161c2e96d916585133ad04 (patch)
treec83397fd1690421a8c4836c4f72cf448f78e7a78 /daemon/gvfsbackendgoogle.c
parent2714228c41150d4746174f97ae849ccc949240e0 (diff)
downloadgvfs-014a3d9edea522d460161c2e96d916585133ad04.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.
Diffstat (limited to 'daemon/gvfsbackendgoogle.c')
-rw-r--r--daemon/gvfsbackendgoogle.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/daemon/gvfsbackendgoogle.c b/daemon/gvfsbackendgoogle.c
index 47fc671f..7ffea960 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)
{
@@ -1083,7 +1068,6 @@ build_file_info (GVfsBackendGoogle *self,
g_free (copy_name);
g_free (escaped_name);
g_free (content_type);
- g_list_free (links);
}
/* ---------------------------------------------------------------------------------------------------- */