summaryrefslogtreecommitdiff
path: root/client/gdaemonfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'client/gdaemonfile.c')
-rw-r--r--client/gdaemonfile.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/client/gdaemonfile.c b/client/gdaemonfile.c
index f0716b1d..3148eef8 100644
--- a/client/gdaemonfile.c
+++ b/client/gdaemonfile.c
@@ -440,12 +440,17 @@ create_proxy_for_file2 (GFile *file1,
connection = _g_dbus_connection_get_sync (mount_info1->dbus_id, cancellable, &local_error);
if (connection == NULL)
{
- 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_info1->dbus_id,