index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Allan McRae <allan@archlinux.org> | 2020-04-13 22:24:23 +1000 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2020-04-13 23:44:46 +1000 |
commit | 6ba250e4001740ca428226abf157b25aa121c7bf (patch) | |
tree | ffed2284aad82174e784e01f1ded9af126880cf9 /lib/libalpm/dload.c | |
parent | 0eda92c5d4f8810a68066ee72713ffdfa878dd8c (diff) |
-rw-r--r-- | lib/libalpm/dload.c | 6 |
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index 670da03d..57232a53 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -424,11 +424,10 @@ static int curl_download_internal(struct dload_payload *payload, if(localf == NULL) { localf = fopen(payload->tempfile_name, payload->tempfile_openmode); if(localf == NULL) { - handle->pm_errno = ALPM_ERR_RETRIEVE; _alpm_log(handle, ALPM_LOG_ERROR, _("could not open file %s: %s\n"), payload->tempfile_name, strerror(errno)); - goto cleanup; + GOTO_ERR(handle, ALPM_ERR_RETRIEVE, cleanup); } } @@ -535,10 +534,9 @@ static int curl_download_internal(struct dload_payload *payload, * as actually being transferred during curl_easy_perform() */ if(!DOUBLE_EQ(remote_size, -1) && !DOUBLE_EQ(bytes_dl, -1) && !DOUBLE_EQ(bytes_dl, remote_size)) { - handle->pm_errno = ALPM_ERR_RETRIEVE; _alpm_log(handle, ALPM_LOG_ERROR, _("%s appears to be truncated: %jd/%jd bytes\n"), payload->remote_name, (intmax_t)bytes_dl, (intmax_t)remote_size); - goto cleanup; + GOTO_ERR(handle, ALPM_ERR_RETRIEVE, cleanup); } if(payload->trust_remote_name) { |