index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dan McGee <dan@archlinux.org> | 2012-03-16 12:08:10 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-03-16 12:08:10 -0500 |
commit | e6f72c61a098b52ea29e54b8eb4739a2ff81e6b0 (patch) | |
tree | f04692879dc63fe9f958500ebd646eb169d32fe4 /lib/libalpm/sync.c | |
parent | 573bd80f147ce90f21ef51fb8ca6f71e89cc3a74 (diff) | |
parent | f988aa6b32503f5d4003b1402089df74adf8b485 (diff) |
-rw-r--r-- | lib/libalpm/sync.c | 8 |
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; |