summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--daemon/gvfsbackendgoogle.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/daemon/gvfsbackendgoogle.c b/daemon/gvfsbackendgoogle.c
index 27f670ac..684a2e8a 100644
--- a/daemon/gvfsbackendgoogle.c
+++ b/daemon/gvfsbackendgoogle.c
@@ -1088,8 +1088,26 @@ resolve (GVfsBackendGoogle *self,
ret_val = resolve_child (self, parent, basename, cancellable, &local_error);
if (ret_val == NULL)
{
- g_propagate_error (error, local_error);
- goto out;
+ /* This fallback provides volatile entries for URIs which was used
+ * before My Drive folder was added in the root. */
+ if (parent == self->root)
+ {
+ g_clear_error (&local_error);
+ ret_val = resolve_child (self, self->home, basename, cancellable, &local_error);
+ if (ret_val != NULL && out_path != NULL)
+ {
+ gchar *tmp;
+ tmp = g_build_path ("/", *out_path, gdata_entry_get_id (self->home), NULL);
+ g_free (*out_path);
+ *out_path = tmp;
+ }
+ }
+
+ if (ret_val == NULL)
+ {
+ g_propagate_error (error, local_error);
+ goto out;
+ }
}
if (out_path != NULL)