diff options
author | Olivier Brunel <jjk@jjacky.com> | 2014-07-31 19:42:28 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-10-02 14:50:17 +0200 |
commit | 1e3c088c2e14c7211e77ad73201458418fd34091 (patch) | |
tree | d031263ac9ad10bb3bd74f9f9f01ea1540ea0437 /proto | |
parent | ca8319aec904c1f59b51bf642d730d646e50b170 (diff) | |
download | pacman-1e3c088c2e14c7211e77ad73201458418fd34091.tar.gz pacman-1e3c088c2e14c7211e77ad73201458418fd34091.tar.xz |
alpm: Fix wrong xferred/total sizes when resuming downloads
When a package is already partially downloaded in the cache, its download
size will only be of what's left to be downloaded. Since pkg->download_size
is what's used when calculating the total download size for the totaldl
callback, same thing apply.
However, the download progress callback was including this initial size,
which would thus lead to invalid values (and percentage) used in frontends.
That is, the progress bar could e.g. go further than 100%
In the case of pacman, there is a sanity check for different historical
reason (44a57c89), so before the possible "overflow" was noticed, the total
download size/progress reported was wrong. Once caught, the TotalDownload
option was ignored and it would use individual file download values as
fallback instead.
Signed-off-by: Olivier Brunel <jjk@jjacky.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'proto')
0 files changed, 0 insertions, 0 deletions