From 9aa750776a6c6807fbb6b59d1d36361c4d4f7536 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 19 Feb 2023 01:00:00 +0100 Subject: [PATCH] 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 @@ (define (notify-transfer-progress item port sizes total 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))