summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2015-07-21 14:46:41 +0100
committerRichard Hughes <richard@hughsie.com>2015-07-21 14:46:41 +0100
commit15cb3c86bc1967a388702122fe7a9a610d25a189 (patch)
tree0c02590572d9585e5ed83a4d45fff7937926db75
parent2d335dbd6e82ef940765b8da6fe8a4be6effc480 (diff)
downloadappstream-glib-15cb3c86bc1967a388702122fe7a9a610d25a189.tar.gz
trivial: Do not rewrite the location when mirroring local firmware
-rw-r--r--client/as-util.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/as-util.c b/client/as-util.c
index ab92b84..7eb49cd 100644
--- a/client/as-util.c
+++ b/client/as-util.c
@@ -3365,10 +3365,14 @@ as_util_mirror_local_firmware (AsUtilPrivate *priv, gchar **values, GError **err
if (releases->len == 0)
continue;
for (j = 0; j < releases->len; j++) {
+ const gchar *tmp;
_cleanup_free_ gchar *loc = NULL;
_cleanup_free_ gchar *fn = NULL;
rel = g_ptr_array_index (releases, j);
- fn = g_strdup_printf ("%s.cab", as_release_get_checksum (rel, G_CHECKSUM_SHA1));
+ tmp = as_release_get_location_default (rel);
+ if (tmp == NULL)
+ continue;
+ fn = g_path_get_basename (tmp);
loc = g_build_filename (values[1], fn, NULL);
g_ptr_array_set_size (as_release_get_locations (rel), 0);
as_release_add_location (rel, loc, -1);