Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/sync.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-03-16 12:08:10 -0500
committerDan McGee <dan@archlinux.org>2012-03-16 12:08:10 -0500
commite6f72c61a098b52ea29e54b8eb4739a2ff81e6b0 (patch)
treef04692879dc63fe9f958500ebd646eb169d32fe4 /lib/libalpm/sync.c
parent573bd80f147ce90f21ef51fb8ca6f71e89cc3a74 (diff)
parentf988aa6b32503f5d4003b1402089df74adf8b485 (diff)
Merge branch 'maint'
Conflicts: lib/libalpm/sync.c
Diffstat (limited to 'lib/libalpm/sync.c')
-rw-r--r--lib/libalpm/sync.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index e84679a0..ab7fe319 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -864,6 +864,9 @@ static int download_single_file(alpm_handle_t *handle, struct dload_payload *pay
{
const alpm_list_t *server;
+ payload->handle = handle;
+ payload->allow_resume = 1;
+
for(server = payload->servers; server; server = server->next) {
const char *server_url = server->data;
size_t len;
@@ -872,12 +875,13 @@ static int download_single_file(alpm_handle_t *handle, struct dload_payload *pay
len = strlen(server_url) + strlen(payload->remote_name) + 2;
MALLOC(payload->fileurl, len, RET_ERR(handle, ALPM_ERR_MEMORY, -1));
snprintf(payload->fileurl, len, "%s/%s", server_url, payload->remote_name);
- payload->handle = handle;
- payload->allow_resume = 1;
if(_alpm_download(payload, cachedir, NULL) != -1) {
return 0;
}
+
+ free(payload->fileurl);
+ payload->unlink_on_fail = 0;
}
return -1;