Fix calculation of space needed for download package

The calculation used the size of the package rather than the amount
remaining to download for partially downloaded packages.

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2024-06-19 14:09:48 +10:00
parent 479f4d574a
commit b60b779fc8

View file

@ -805,7 +805,7 @@ static int download_files(alpm_handle_t *handle)
for(i = files, idx = 0; i; i = i->next, idx++) {
const alpm_pkg_t *pkg = i->data;
file_sizes[idx] = pkg->size;
file_sizes[idx] = pkg->download_size;
}
ret = _alpm_check_downloadspace(handle, temporary_cachedir, num_files, file_sizes);