From 9b7c339ca6adee4b669c0ab595525a6b07d8019b Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 3 Jun 2016 18:28:35 +0100 Subject: [PATCH] flatpak-run: don't fail if there are no system fonts In a minimal environment (like the one where we run installed-tests in Debian), we might not have /usr/share/fonts. Signed-off-by: Simon McVittie --- common/flatpak-run.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/common/flatpak-run.c b/common/flatpak-run.c index 80348979..190e7bb4 100644 --- a/common/flatpak-run.c +++ b/common/flatpak-run.c @@ -2278,9 +2278,12 @@ add_font_path_args (GPtrArray *argv_array) g_autoptr(GFile) user_font1 = NULL; g_autoptr(GFile) user_font2 = NULL; - add_args (argv_array, - "--bind", SYSTEM_FONTS_DIR, "/run/host/fonts", - NULL); + if (g_file_test (SYSTEM_FONTS_DIR, G_FILE_TEST_EXISTS)) + { + add_args (argv_array, + "--bind", SYSTEM_FONTS_DIR, "/run/host/fonts", + NULL); + } home = g_file_new_for_path (g_get_home_dir ()); user_font1 = g_file_resolve_relative_path (home, ".local/share/fonts");