Avoid showing the progress bar until copying really starts

This commit is contained in:
Anis Elleuch
2015-06-03 22:21:54 +01:00
parent 2f47edb2e3
commit 4de9d69d17
+1 -1
View File
@@ -121,12 +121,12 @@ func newCpBar() barSend {
barCaption = msg.Arg.(string)
case cpBarCmdExtend:
atomic.AddInt64(&bar.Total, msg.Arg.(int64))
case cpBarCmdProgress:
if bar.Total > 0 && !started {
started = true
redraw = true
bar.Start()
}
case cpBarCmdProgress:
if msg.Arg.(int64) > 0 {
totalBytesRead += msg.Arg.(int64)
bar.Add64(msg.Arg.(int64))