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
This commit is contained in:
Alexander Larsson
2018-02-06 11:48:13 +01:00
committed by Atomic Bot
parent 41e38774c5
commit e90e8b99f3

View File

@@ -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
{