From aff69f43b1bd9cf602dd5bf2c0b6d1bbe5e336f2 Mon Sep 17 00:00:00 2001 From: Anatol Pomozov Date: Wed, 4 Mar 2020 13:25:32 -0800 Subject: 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 Signed-off-by: Allan McRae --- lib/libalpm/sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3-24-g4f1b