Fix calculation of estimated completion for progress meter.

Was estimating transfer of whole file, not remaining part of it.
This commit is contained in:
Joey Hess 2018-03-19 23:26:41 -04:00
parent ae462950a9
commit bebf541aa7
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
git-annex (6.20180317) UNRELEASED; urgency=medium
* Fix calculation of estimated completion for progress meter.
-- Joey Hess <id@joeyh.name> Mon, 19 Mar 2018 23:13:59 -0400
git-annex (6.20180316) upstream; urgency=medium
* New protocol for communicating with git-annex-shell increases speed

View file

@ -383,5 +383,5 @@ bandwidthMeter mtotalsize (BytesProcessed old, before) (BytesProcessed new, now)
Just totalsize
| bytespersecond > 0 ->
Just $ fromDuration $ Duration $
totalsize `div` bytespersecond
(totalsize - new) `div` bytespersecond
_ -> Nothing