nckx pushed a commit to branch master
in repository guix.
commit 9aa750776a6c6807fbb6b59d1d36361c4d4f7536
Author: Tobias Geerinckx-Rice <[email protected]>
AuthorDate: Sun Feb 19 01:00:00 2023 +0100
ssh: Factor out progress % calculation.
* guix/ssh.scm (notify-transfer-progress): Trust its % argument.
---
guix/ssh.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/guix/ssh.scm b/guix/ssh.scm
index 1b825a2573..5b35f664d9 100644
--- a/guix/ssh.scm
+++ b/guix/ssh.scm
@@ -477,7 +477,7 @@ Use SIZES to determine the size of ITEM, which is about to
be sent."
(define (display-bar %)
(erase-current-line port)
(format port "~3@a% ~a"
- (inexact->exact (round (* 100. (/ sent total))))
+ (inexact->exact (round %))
(progress-bar % (- (max (current-terminal-columns) 5) 5)))
(force-output port))