From e90e8b99f371eef441e610ffd973fee209382402 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 6 Feb 2018 11:48:13 +0100 Subject: [PATCH] Handle non-existing document portal nicer The document portal is essentially optional, so avoid spewing errors if it is not available, but also report this nicer with -v. Closes: #1387 Approved by: alexlarsson --- common/flatpak-run.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/flatpak-run.c b/common/flatpak-run.c index 0dadd0a2..8638f713 100644 --- a/common/flatpak-run.c +++ b/common/flatpak-run.c @@ -1545,7 +1545,10 @@ add_document_portal_args (FlatpakBwrap *bwrap, { if (g_dbus_message_to_gerror (reply, &local_error)) { - g_message ("Can't get document portal: %s", local_error->message); + if (g_error_matches (local_error, G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN)) + g_debug ("Document portal not available, not mounting /run/user/%d/doc", getuid ()); + else + g_message ("Can't get document portal: %s", local_error->message); } else {