From 7bbb01c3014cc996ec24a7e5c0684f24b604b735 Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Tue, 4 Oct 2016 12:25:24 +0300 Subject: [PATCH] Fix #108 :)) --- libgrive/src/util/ProgressBar.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libgrive/src/util/ProgressBar.cc b/libgrive/src/util/ProgressBar.cc index 6fe1444..6a26b6e 100644 --- a/libgrive/src/util/ProgressBar.cc +++ b/libgrive/src/util/ProgressBar.cc @@ -47,10 +47,10 @@ void ProgressBar::reportProgress(u64_t total, u64_t processed) processed = total; double fraction = (double)processed/total; - int point = round(fraction*1000); + int point = fraction*1000; if (this->last < 1000 || point != this->last) { - // only print progress after >= 0.1% change + // do not print 100% progress multiple times (it will duplicate the progressbar) this->last = point; // 10 for prefix of percent and 26 for suffix of file size