diff options
author | Allan McRae <allan@archlinux.org> | 2020-01-23 01:47:02 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2020-01-27 08:53:50 +0100 |
commit | e54617c7d554e0c14c039432b5f7bef66e43769c (patch) | |
tree | 891abaed7f640d84e476e9b58deacb9439038b69 /lib | |
parent | d626a17ef94d79975ff17d04250152ea46aaade3 (diff) | |
download | pacman-e54617c7d554e0c14c039432b5f7bef66e43769c.tar.gz pacman-e54617c7d554e0c14c039432b5f7bef66e43769c.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>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libalpm/dload.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index b3e6a411..e72a0b2a 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -415,7 +415,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; |