summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnatol Pomozov <anatol.pomozov@gmail.com>2020-03-04 22:25:32 +0100
committerAllan McRae <allan@archlinux.org>2020-03-05 07:15:44 +0100
commitaff69f43b1bd9cf602dd5bf2c0b6d1bbe5e336f2 (patch)
tree4f150ee460936351f6209fd707aa78f98f816664
parent130db5cc9eb5c58681cbdf76d18ab383b14edebe (diff)
downloadpacman-aff69f43b1bd9cf602dd5bf2c0b6d1bbe5e336f2.tar.gz
pacman-aff69f43b1bd9cf602dd5bf2c0b6d1bbe5e336f2.tar.xz
Do not download files if find_dl_candidates() fails
One reason why the function returns an error is some repo does not have any servers. Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--lib/libalpm/sync.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 89cc7867..50b21b54 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -787,7 +787,7 @@ static int download_files(alpm_handle_t *handle)
errors += find_dl_candidates(handle, &files);
- if(files) {
+ if(files && !errors) {
/* check for necessary disk space for download */
if(handle->checkspace) {
off_t *file_sizes;