diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-08-15 14:21:31 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-08-15 14:21:31 +0200 |
commit | d0f1646ae06ca5710b015662b9244e277dce73fa (patch) | |
tree | a05bac27eed31cd7d867c524fac71dc57b2d3cdd /apt-pkg | |
parent | c5ca2c52a98fcb50de6429cf370ed5b6b7602a00 (diff) | |
parent | abcbf0af368cdda142b5d7cc03f793cfbdf23028 (diff) |
merged from lp:~mvo/apt/mvo
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/acquire.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc index 34e2f5aac..8c00748b2 100644 --- a/apt-pkg/acquire.cc +++ b/apt-pkg/acquire.cc @@ -849,7 +849,9 @@ bool pkgAcquireStatus::Pulse(pkgAcquire *Owner) char msg[200]; long i = CurrentItems < TotalItems ? CurrentItems + 1 : CurrentItems; - unsigned long long const ETA = (TotalBytes - CurrentBytes) / CurrentCPS; + unsigned long long ETA = 0; + if(CurrentCPS > 0) + ETA = (TotalBytes - CurrentBytes) / CurrentCPS; // only show the ETA if it makes sense if (ETA > 0 && ETA < 172800 /* two days */ ) |