summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2015-06-04 16:33:33 +0200
committerOndrej Holy <oholy@redhat.com>2015-06-08 11:01:59 +0200
commit44100b4a828577786062c27d9bfb34d7a5844fff (patch)
tree1b4dcd3216207530a366b8f7dadb88db65627892
parent0f91898d0bc148ba0efa188d6798c3b5a780ab43 (diff)
downloadgvfs-44100b4a828577786062c27d9bfb34d7a5844fff.tar.gz
client: Suppress errors if daemon part is missing
We want to split gvfs package on client and daemon part due to app sandboxing. Return FALSE from vfs_is_active if there aren't any supported uri schemes (i.e. deamon part is missing). It will cause things to work just like if the gvfs client part was never installed. Replace some warnings/errors by g_debug to suppress errors when registering gio modules and daemon part is missing. https://bugzilla.gnome.org/show_bug.cgi?id=750401
-rw-r--r--client/gdaemonvfs.c10
-rw-r--r--common/gvfsmonitorimpl.c2
2 files changed, 4 insertions, 8 deletions
diff --git a/client/gdaemonvfs.c b/client/gdaemonvfs.c
index 3b0337dc..11435e85 100644
--- a/client/gdaemonvfs.c
+++ b/client/gdaemonvfs.c
@@ -607,12 +607,8 @@ fill_mountable_info (GDaemonVfs *vfs)
NULL,
&error))
{
- /* Don't warn if we're running a new gvfs plugin against an old gvfs-daemon,
- * as happens in jhbuild.
- */
- if (!g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD))
- g_printerr ("org.gtk.vfs.MountTracker.listMountableInfo call failed: %s (%s, %d)\n",
- error->message, g_quark_to_string (error->domain), error->code);
+ g_debug ("org.gtk.vfs.MountTracker.listMountableInfo call failed: %s (%s, %d)\n",
+ error->message, g_quark_to_string (error->domain), error->code);
g_error_free (error);
g_object_unref (proxy);
return;
@@ -1454,7 +1450,7 @@ static gboolean
g_daemon_vfs_is_active (GVfs *vfs)
{
GDaemonVfs *daemon_vfs = G_DAEMON_VFS (vfs);
- return daemon_vfs->async_bus != NULL;
+ return (daemon_vfs->async_bus != NULL) && (daemon_vfs->supported_uri_schemes != NULL);
}
static void
diff --git a/common/gvfsmonitorimpl.c b/common/gvfsmonitorimpl.c
index 1d5d0e2a..882c3fbf 100644
--- a/common/gvfsmonitorimpl.c
+++ b/common/gvfsmonitorimpl.c
@@ -98,7 +98,7 @@ g_vfs_list_monitor_implementations (void)
dir = g_dir_open (monitors_dir, 0, &error);
if (dir == NULL)
{
- g_warning ("cannot open directory %s: %s", monitors_dir, error->message);
+ g_debug ("cannot open directory %s: %s", monitors_dir, error->message);
g_error_free (error);
}
else