Fix: Progress bar no longer jumps when hitting 100%

This commit is contained in:
Simon Hartcher
2017-02-11 18:09:28 +11:00
parent 798e07a053
commit f62dacef0b
+2 -2
View File
@@ -230,8 +230,8 @@ function dl_progress_output($url, $read, $total, $console) {
}
# the remaining characters are filled with spaces
$spaces = switch($p) {
100 {[string]::Empty}
$spaces = switch($dashes.Length) {
$midwidth {[string]::Empty}
default {
[string]::Join("", ((1..($midwidth - $dashes.Length)) | ForEach-Object {" "}))
}