From 4de9d69d179451d71ef3edfc9ba9f44635e2b101 Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Wed, 3 Jun 2015 22:21:54 +0100 Subject: [PATCH] Avoid showing the progress bar until copying really starts --- cp-bar.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cp-bar.go b/cp-bar.go index f9aa8ea7..88f83b33 100644 --- a/cp-bar.go +++ b/cp-bar.go @@ -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))