summaryrefslogtreecommitdiff
path: root/client/gvfsiconloadable.c
diff options
context:
space:
mode:
Diffstat (limited to 'client/gvfsiconloadable.c')
-rw-r--r--client/gvfsiconloadable.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/client/gvfsiconloadable.c b/client/gvfsiconloadable.c
index 45fb6c2c..f1e6cd08 100644
--- a/client/gvfsiconloadable.c
+++ b/client/gvfsiconloadable.c
@@ -61,12 +61,17 @@ create_proxy_for_icon (GVfsIcon *vfs_icon,
if (connection == NULL)
{
g_dbus_error_strip_remote_error (local_error);
- g_warning ("The peer-to-peer connection failed: %s. Your application is "
- "probably missing --filesystem=xdg-run/gvfsd privileges.",
- local_error->message);
- goto out;
+ g_warning ("The peer-to-peer connection failed: %s. Falling back to the "
+ "session bus. Your application is probably missing "
+ "--filesystem=xdg-run/gvfsd privileges.", local_error->message);
+ g_clear_error (&local_error);
+
+ connection = g_bus_get_sync (G_BUS_TYPE_SESSION, cancellable, &local_error);
}
+ if (connection == NULL)
+ goto out;
+
proxy = gvfs_dbus_mount_proxy_new_sync (connection,
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
mount_info->dbus_id,