diff options
author | Simon McVittie <smcv@collabora.com> | 2023-02-08 18:34:34 +0000 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2023-02-08 21:14:17 +0000 |
commit | be2de97e862e5ca223da40a895e54e7bf24dbfb9 (patch) | |
tree | 1e31a9ff709d129191d91d9cbdad7c553a98b71e /common | |
parent | 3ede5382fa8e7f90d62e72bc72da64277ea254b7 (diff) | |
download | flatpak-be2de97e862e5ca223da40a895e54e7bf24dbfb9.tar.gz |
dir: If metadata is syntactically invalid, say which file is the problem
Similar to the previous commit, but for metadata.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/flatpak-dir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c index fea8a24b..84816389 100644 --- a/common/flatpak-dir.c +++ b/common/flatpak-dir.c @@ -2983,7 +2983,7 @@ flatpak_dir_load_deployed (FlatpakDir *self, metakey = g_key_file_new (); if (!g_key_file_load_from_data (metakey, metadata_contents, metadata_size, 0, error)) - return NULL; + return glnx_prefix_error_null (error, "%s", flatpak_file_get_path_cached (metadata)); deploy = flatpak_deploy_new (deploy_dir, ref, metakey, self->repo); @@ -3633,7 +3633,7 @@ upgrade_deploy_data (GBytes *deploy_data, &metadata_contents, &metadata_size, NULL, error)) return NULL; if (!g_key_file_load_from_data (keyfile, metadata_contents, metadata_size, 0, error)) - return NULL; + return glnx_prefix_error_null (error, "%s", flatpak_file_get_path_cached (metadata_file)); add_metadata_to_deploy_data (&metadata_dict, keyfile); /* Add fields from appdata to deploy, since appdata-content-rating wasn't |