Possible temporary fix for #1334, disable download progress if content length has not been set (-1)

This commit is contained in:
Luke Sampson
2017-02-14 13:56:46 +11:00
parent b77e5c49f4
commit 02863d3a30

View File

@@ -161,7 +161,7 @@ function dl($url, $to, $cookies, $progress) {
$wres = $wreq.getresponse()
$total = $wres.ContentLength
if ($progress) {
if ($progress -and ($total -gt 0)) {
[console]::CursorVisible = $false
function dl_onProgress($read) {
dl_progress $read $total $url