Merge pull request #1597 from harshavardhana/progress-bar

progressBar: Finish progress bar if total is greater than 0
This commit is contained in:
Krishna Srinivas
2016-02-02 14:54:59 +05:30
2 changed files with 7 additions and 4 deletions
+4 -3
View File
@@ -356,9 +356,10 @@ func doCopySession(session *sessionV6) {
wg.Wait()
if !globalQuiet && !globalJSON {
progressReader.ProgressBar.Finish()
}
if globalQuiet {
if progressReader.ProgressBar.Total > 0 {
progressReader.ProgressBar.Finish()
}
} else {
accntStat := accntReader.Stat()
cpStatMessage := copyStatMessage{
Total: accntStat.Total,
+3 -1
View File
@@ -339,7 +339,9 @@ func doMirrorSession(session *sessionV6) {
wg.Wait()
if !globalQuiet && !globalJSON {
progressReader.ProgressBar.Finish()
if progressReader.ProgressBar.Total > 0 {
progressReader.ProgressBar.Finish()
}
} else {
accntStat := accntReader.Stat()
mrStatMessage := mirrorStatMessage{