From d61c398b2cb3ec41e62a6e258b5791d0ce9de720 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Thu, 23 Jan 2020 10:47:02 +1000 Subject: Fix "pacman -U " 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 (cherry picked from commit e54617c7d554e0c14c039432b5f7bef66e43769c) --- lib/libalpm/dload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3-24-g4f1b