guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

08/10: ssh: Factor out progress % calculation.


From: guix-commits
Subject: 08/10: ssh: Factor out progress % calculation.
Date: Thu, 23 Feb 2023 17:54:57 -0500 (EST)

nckx pushed a commit to branch master
in repository guix.

commit 9aa750776a6c6807fbb6b59d1d36361c4d4f7536
Author: Tobias Geerinckx-Rice <me@tobias.gr>
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))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]