cmd: fix crash with --progress and --stats 0 #2501

This commit is contained in:
Nick Craig-Wood 2018-09-04 14:39:48 +01:00
parent 6396872d75
commit 0c11eec70e

View File

@ -38,7 +38,7 @@ func startProgress() chan struct{} {
} }
go func() { go func() {
progressInterval := defaultProgressInterval progressInterval := defaultProgressInterval
if ShowStats() { if ShowStats() && *statsInterval > 0 {
progressInterval = *statsInterval progressInterval = *statsInterval
} }
ticker := time.NewTicker(progressInterval) ticker := time.NewTicker(progressInterval)