diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/gdaemonfile.c | 15 | ||||
-rw-r--r-- | client/gdaemonfilemonitor.c | 6 | ||||
-rw-r--r-- | client/gdaemonmount.c | 7 | ||||
-rw-r--r-- | client/gvfsiconloadable.c | 13 |
4 files changed, 33 insertions, 8 deletions
diff --git a/client/gdaemonfile.c b/client/gdaemonfile.c index f11cf91c..6111b7bd 100644 --- a/client/gdaemonfile.c +++ b/client/gdaemonfile.c @@ -439,7 +439,13 @@ create_proxy_for_file2 (GFile *file1, connection = _g_dbus_connection_get_sync (mount_info1->dbus_id, cancellable, &local_error); if (connection == NULL) - goto out; + { + 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; + } proxy = gvfs_dbus_mount_proxy_new_sync (connection, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS, @@ -613,8 +619,11 @@ async_got_connection_cb (GDBusConnection *connection, if (connection == NULL) { - /* TODO: we should probably test if we really want a session bus; - * for now, this code is on par with the old dbus code */ + g_dbus_error_strip_remote_error (io_error); + 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.", io_error->message); + g_bus_get (G_BUS_TYPE_SESSION, g_task_get_cancellable (data->task), bus_get_cb, diff --git a/client/gdaemonfilemonitor.c b/client/gdaemonfilemonitor.c index 2d9f958f..6c80c6ab 100644 --- a/client/gdaemonfilemonitor.c +++ b/client/gdaemonfilemonitor.c @@ -180,8 +180,10 @@ g_daemon_file_monitor_new (const char *remote_id, connection = _g_dbus_connection_get_sync (daemon_monitor->remote_id, NULL, &error); if (connection == NULL) { - g_printerr ("Error getting connection for monitoring: %s (%s, %d)\n", - error->message, g_quark_to_string (error->domain), error->code); + g_dbus_error_strip_remote_error (error); + g_warning ("The peer-to-peer connection failed: %s. Your application is " + "probably missing --filesystem=xdg-run/gvfsd privileges.", + error->message); g_error_free (error); } else diff --git a/client/gdaemonmount.c b/client/gdaemonmount.c index d49fad89..a3cb2578 100644 --- a/client/gdaemonmount.c +++ b/client/gdaemonmount.c @@ -315,8 +315,11 @@ async_got_connection_cb (GDBusConnection *connection, if (connection == NULL) { - /* TODO: we should probably test if we really want a session bus; - * for now, this code is on par with the old dbus code */ + g_dbus_error_strip_remote_error (io_error); + 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.", io_error->message); + g_bus_get (G_BUS_TYPE_SESSION, g_task_get_cancellable (task), bus_get_cb, diff --git a/client/gvfsiconloadable.c b/client/gvfsiconloadable.c index 5050cfbe..45fb6c2c 100644 --- a/client/gvfsiconloadable.c +++ b/client/gvfsiconloadable.c @@ -59,7 +59,13 @@ create_proxy_for_icon (GVfsIcon *vfs_icon, connection = _g_dbus_connection_get_sync (mount_info->dbus_id, cancellable, &local_error); if (connection == NULL) - goto out; + { + 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; + } proxy = gvfs_dbus_mount_proxy_new_sync (connection, G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS, @@ -242,6 +248,11 @@ async_got_connection_cb (GDBusConnection *connection, if (connection == NULL) { + g_dbus_error_strip_remote_error (io_error); + 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.", io_error->message); + g_bus_get (G_BUS_TYPE_SESSION, g_task_get_cancellable (data->task), bus_get_cb, |