diff options
author | Alexander Larsson <alexl@redhat.com> | 2016-10-12 17:04:53 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2016-10-21 08:57:42 +0200 |
commit | d7a102210f20f022293cba91e4d82e74783f404d (patch) | |
tree | 7127ff275d17b8bd140b4b6b994e206749020dea | |
parent | 4bea82a60818886277462b5a79ac96efff9f1262 (diff) | |
download | flatpak-d7a102210f20f022293cba91e4d82e74783f404d.tar.gz |
extra-data: After applying extra-data, export any exports
-rw-r--r-- | common/flatpak-dir.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c index d225da24..e060a990 100644 --- a/common/flatpak-dir.c +++ b/common/flatpak-dir.c @@ -3060,6 +3060,8 @@ apply_extra_data (FlatpakDir *self, g_autoptr(FlatpakDeploy) runtime_deploy = NULL; g_autoptr(GFile) app_files = NULL; g_autoptr(GFile) apply_extra_file = NULL; + g_autoptr(GFile) app_export_file = NULL; + g_autoptr(GFile) extra_export_file = NULL; g_autoptr(GFile) extra_files = NULL; g_autoptr(GFile) runtime_files = NULL; g_autoptr(GPtrArray) argv_array = NULL; @@ -3101,7 +3103,9 @@ apply_extra_data (FlatpakDir *self, return FALSE; app_files = g_file_get_child (checkoutdir, "files"); + app_export_file = g_file_get_child (checkoutdir, "export"); extra_files = g_file_get_child (app_files, "extra"); + extra_export_file = g_file_get_child (extra_files, "export"); runtime_files = flatpak_deploy_get_files (runtime_deploy); argv_array = g_ptr_array_new_with_free_func (g_free); @@ -3151,6 +3155,17 @@ apply_extra_data (FlatpakDir *self, return FALSE; } + if (g_file_query_exists (extra_export_file, cancellable)) + { + if (!flatpak_mkdir_p (app_export_file, cancellable, error)) + return FALSE; + if (!flatpak_cp_a (extra_export_file, + app_export_file, + FLATPAK_CP_FLAGS_MERGE, + cancellable, error)) + return FALSE; + } + return TRUE; } |