run: Always create a fontconfig cache dir in the app dir

Otherwise fontconfig falls back to a shared ~/.fontconfig dir
which means caches are not per-app, and is not necessarily accessible.

(cherry picked from commit fef8743f26)

Closes: #1115
Approved by: alexlarsson
This commit is contained in:
Alexander Larsson
2017-08-31 16:09:02 +02:00
committed by Atomic Bot
parent 25c151fbd9
commit 37d809ff9f

View File

@@ -3057,6 +3057,7 @@ flatpak_ensure_data_dir (const char *app_id,
g_autoptr(GFile) dir = flatpak_get_data_dir (app_id);
g_autoptr(GFile) data_dir = g_file_get_child (dir, "data");
g_autoptr(GFile) cache_dir = g_file_get_child (dir, "cache");
g_autoptr(GFile) fontconfig_cache_dir = g_file_get_child (cache_dir, "fontconfig");
g_autoptr(GFile) tmp_dir = g_file_get_child (cache_dir, "tmp");
g_autoptr(GFile) config_dir = g_file_get_child (dir, "config");
@@ -3066,6 +3067,9 @@ flatpak_ensure_data_dir (const char *app_id,
if (!flatpak_mkdir_p (cache_dir, cancellable, error))
return NULL;
if (!flatpak_mkdir_p (fontconfig_cache_dir, cancellable, error))
return NULL;
if (!flatpak_mkdir_p (tmp_dir, cancellable, error))
return NULL;