From 96f383198d45874b89659ba5d24a02a3026db26e Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 8 Sep 2016 14:10:18 +0200 Subject: [PATCH] flatpak-info: Move the instance specific data to a separate group We don't want to confuse whats in the metadata file with this runtime instance info. --- common/flatpak-run.c | 9 ++++----- document-portal/xdp-main.c | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/common/flatpak-run.c b/common/flatpak-run.c index fc706dd0..0b3023c9 100644 --- a/common/flatpak-run.c +++ b/common/flatpak-run.c @@ -2609,15 +2609,14 @@ flatpak_run_add_app_info_args (GPtrArray *argv_array, keyfile = g_key_file_new (); g_key_file_set_string (keyfile, "Application", "name", app_id); - if (app_branch != NULL) - g_key_file_set_string (keyfile, "Application", "branch", app_branch); g_key_file_set_string (keyfile, "Application", "runtime", runtime_ref); app_path = g_file_get_path (app_files); - g_key_file_set_string (keyfile, "Application", "app-path", app_path); - + g_key_file_set_string (keyfile, "Instance", "app-path", app_path); runtime_path = g_file_get_path (runtime_files); - g_key_file_set_string (keyfile, "Application", "runtime-path", runtime_path); + g_key_file_set_string (keyfile, "Instance", "runtime-path", runtime_path); + if (app_branch != NULL) + g_key_file_set_string (keyfile, "Instance", "branch", app_branch); flatpak_context_save_metadata (final_app_context, TRUE, keyfile); diff --git a/document-portal/xdp-main.c b/document-portal/xdp-main.c index 4e939640..abd240b5 100644 --- a/document-portal/xdp-main.c +++ b/document-portal/xdp-main.c @@ -418,8 +418,8 @@ validate_fd (int fd, /* For apps we translate /app and /usr to the installed locations. Also, we need to rewrite to drop the /newroot prefix added by bubblewrap for other files to work. */ - app_path = g_key_file_get_string (app_info, "Application", "app-path", NULL); - runtime_path = g_key_file_get_string (app_info, "Application", "runtime-path", NULL); + app_path = g_key_file_get_string (app_info, "Instance", "app-path", NULL); + runtime_path = g_key_file_get_string (app_info, "Instance", "runtime-path", NULL); if (app_path != NULL || runtime_path != NULL) { if (app_path != NULL &&