gnu: surgescript: Update to 0.5.4.4.
[jackhill/guix/guix.git] / guix / ssh.scm
index 5f94528..e41bffc 100644 (file)
@@ -441,14 +441,15 @@ Use SIZES to determine the size of ITEM, which is about to be sent."
             (progress-bar % (- (max (current-terminal-columns) 5) 5)))
     (force-output port))
 
-  (let ((% (* 100. (/ sent total))))
-    (match (vhash-assoc item sizes)
-      (#f
-       (display-bar %)
-       (values port sizes total sent))
-      ((_ . size)
-       (display-bar %)
-       (values port sizes total (+ sent size))))))
+  (unless (zero? total)
+    (let ((% (* 100. (/ sent total))))
+      (match (vhash-assoc item sizes)
+        (#f
+         (display-bar %)
+         (values port sizes total sent))
+        ((_ . size)
+         (display-bar %)
+         (values port sizes total (+ sent size)))))))
 
 (define (notify-transfer-completion port . args)
   "Notify the user that the transfer has completed."
@@ -466,7 +467,7 @@ Return the list of store items actually sent."
   ;; Compute the subset of FILES missing on SESSION and send them.
   (let* ((files   (if recursive? (requisites local files) files))
          (session (channel-get-session (store-connection-socket remote)))
-         (missing (take files 20) #;(inferior-remote-eval
+         (missing (inferior-remote-eval
                    `(begin
                       (use-modules (guix)
                                    (srfi srfi-1) (srfi srfi-26))