extra-data: After applying extra-data, export any exports

tingping/wmclass
Alexander Larsson 2016-10-12 17:04:53 +02:00
parent 4bea82a608
commit d7a102210f
1 changed files with 15 additions and 0 deletions

View File

@ -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;
}