Commit fe6b1dbd authored by Juri Linkov's avatar Juri Linkov
Browse files

(progress-reporter-do-update): When `min-value' is equal

to `max-value', set `percentage' to 0 and prevent division by zero.
parent 340b8d4f
2005-03-20 Juri Linkov <juri@jurta.org>
* subr.el (progress-reporter-do-update): When `min-value' is equal
to `max-value', set `percentage' to 0 and prevent division by zero.
2005-03-20 Michael Albinus <michael.albinus@gmx.de>
 
Sync with Tramp 2.0.48.
......
......@@ -2750,7 +2750,9 @@ change the displayed message."
(min-value (aref parameters 1))
(max-value (aref parameters 2))
(one-percent (/ (- max-value min-value) 100.0))
(percentage (truncate (/ (- value min-value) one-percent)))
(percentage (if (= max-value min-value)
0
(truncate (/ (- value min-value) one-percent))))
(update-time (aref parameters 0))
(current-time (float-time))
(enough-time-passed
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment