X-Git-Url: http://www.git.cypherpunks.ru/?p=nncp.git;a=blobdiff_plain;f=src%2Fprogress.go;h=b11a3ac3f0b1bbdc1c4705250bf9db3889529572;hp=5ebc72bdb20b2e16df5ba53ed33bf0669f5a13b5;hb=b47dbfe6687569650fa544a4ecf3e4ea388390cb;hpb=99c6aa8d7e77b37c58d9dc0c8f3f8ed6a94352f5 diff --git a/src/progress.go b/src/progress.go index 5ebc72b..b11a3ac 100644 --- a/src/progress.go +++ b/src/progress.go @@ -25,7 +25,7 @@ import ( "time" "github.com/dustin/go-humanize" - "go.cypherpunks.ru/nncp/v7/uilive" + "go.cypherpunks.ru/nncp/v8/uilive" ) func init() { @@ -114,6 +114,18 @@ func CopyProgressed( break } } + if showPrgrs { + for _, le := range les { + if le.K == "FullSize" { + if le.V.(int64) == 0 { + Progress(prgrsPrefix, append( + les, LE{"Size", written}, LE{"FullSize", written}, + )) + } + break + } + } + } return } @@ -146,7 +158,7 @@ func Progress(prefix string, les LEs) { } what = prefix + " " + what pb.Render(what, size) - if size >= fullsize { + if fullsize != 0 && size >= fullsize { pb.Kill() progressBarsLock.Lock() delete(progressBars, pkt)