Skip to content

Commit

Permalink
dir: If metadata is syntactically invalid, say which file is the problem
Browse files Browse the repository at this point in the history
Similar to the previous commit, but for metadata.

Signed-off-by: Simon McVittie <[email protected]>
  • Loading branch information
smcv committed Feb 8, 2023
1 parent 3ede538 commit be2de97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/flatpak-dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit be2de97

Please sign in to comment.