mirror of
https://github.com/flatpak/flatpak.git
synced 2026-10-21 15:15:34 -04:00
utils: fix double loop when extracting icons for appstream
When trying to extract icons to regenerate the appstream, we are looping over the entire file every time, instead of only trying to copy icons for the application ID we're looking at the moment. This is most likely benign, but it causes a lot of "Error copying icon: No such file or directory:" spew when calling flatpak build-update-repo.
This commit is contained in:
1 parent
4a83891605
commit
3d2a42ddf3
1 file changed
+4
-2
@@ -2201,7 +2201,8 @@ extract_appstream (OstreeRepo *repo,
|
||||
component_id_text_node = flatpak_xml_find (component_id, NULL, NULL);
|
||||
|
||||
component_id_text = g_strstrip (g_strdup (component_id_text_node->text));
|
||||
if (!g_str_has_suffix (component_id_text, ".desktop"))
|
||||
if (!g_str_has_prefix (component_id_text, id) ||
|
||||
!g_str_has_suffix (component_id_text, ".desktop"))
|
||||
{
|
||||
component = component->next_sibling;
|
||||
continue;
|
||||
@@ -2221,7 +2222,8 @@ extract_appstream (OstreeRepo *repo,
|
||||
g_clear_error (&my_error);
|
||||
}
|
||||
|
||||
component = component->next_sibling;
|
||||
/* We updated icons for our component, so we're done */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user