summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2020-01-23 01:47:02 +0100
committerAndrew Gregory <andrew@archlinux.org>2020-06-18 10:42:34 +0200
commitd61c398b2cb3ec41e62a6e258b5791d0ce9de720 (patch)
tree398c714fdab5f5a0b095db08f7b86e3a24d21907 /lib/libalpm
parent7faa79526874c09fc89fb769744d103bc4918e17 (diff)
downloadpacman-d61c398b2cb3ec41e62a6e258b5791d0ce9de720.tar.gz
pacman-d61c398b2cb3ec41e62a6e258b5791d0ce9de720.tar.xz
Fix "pacman -U <url>" operations
Commit e6a6d307 detected complete part files by comparing a payload's max_size to initial_size. However, these values are also equal when we use pacman -U on a URL as max_size is set to 0 in that case. Add a further condition to avoid that. Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit e54617c7d554e0c14c039432b5f7bef66e43769c)
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/dload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 40a1d07d..7d2dd286 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -414,7 +414,7 @@ static int curl_download_internal(struct dload_payload *payload,
curl_set_handle_opts(payload, curl, error_buffer);
- if(payload->max_size == payload->initial_size) {
+ if(payload->max_size == payload->initial_size && payload->max_size != 0) {
/* .part file is complete */
ret = 0;
goto cleanup;