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>
This commit is contained in:
Anatol Pomozov 2020-03-04 13:25:32 -08:00 committed by Allan McRae
parent 130db5cc9e
commit aff69f43b1

View file

@ -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;