Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/sync.c')
-rw-r--r--lib/libalpm/sync.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index e25e56d4..3919d266 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -760,12 +760,16 @@ static int download_files(alpm_handle_t *handle)
* frontend to compute incremental progress. */
if(handle->totaldlcb) {
off_t total_size = (off_t)0;
+ size_t howmany = 0;
/* sum up the download size for each package and store total */
for(i = handle->trans->add; i; i = i->next) {
alpm_pkg_t *spkg = i->data;
total_size += spkg->download_size;
+ if(spkg->download_size > 0) {
+ howmany++;
+ }
}
- handle->totaldlcb(total_size);
+ handle->totaldlcb(howmany, total_size);
}
ret = find_dl_candidates(handle, &files);