Fix vendor-directory remotes for firmware with an <artifact> section

This commit is contained in:
Richard Hughes 2021-06-12 11:28:12 +01:00
parent 5051614206
commit 60453d9d3c

View File

@ -484,16 +484,16 @@ fu_engine_set_release_from_appstream (FuEngine *self,
if (uri == NULL)
uri = g_strdup (tmp);
fwupd_release_add_location (rel, uri);
} else if (remote != NULL &&
}
}
if (fwupd_release_get_locations(rel)->len == 0 && remote != NULL &&
fwupd_remote_get_kind (remote) == FWUPD_REMOTE_KIND_DIRECTORY) {
g_autofree gchar *uri = NULL;
tmp = xb_node_query_text (component, "../custom/value[@key='fwupd::FilenameCache']", NULL);
if (tmp != NULL) {
uri = g_strdup_printf ("file://%s", tmp);
g_autofree gchar *uri = g_strdup_printf ("file://%s", tmp);
fwupd_release_add_location (rel, uri);
}
}
}
if (artifact == NULL) {
tmp = xb_node_query_text (release, "checksum[@target='content']", NULL);
if (tmp != NULL)