Convert panics from message parser to error

This commit is contained in:
Michal Horejsek
2020-08-31 15:57:45 +02:00
parent 61867fbde7
commit 1d2e584799
7 changed files with 16 additions and 7 deletions

View File

@ -185,7 +185,9 @@ func (f *frontendCLI) setTransferRules(t *transfer.Transfer) bool {
func (f *frontendCLI) printTransferProgress(progress *transfer.Progress) {
failed, imported, exported, added, total := progress.GetCounts()
f.Println(fmt.Sprintf("Progress update: %d (%d / %d) / %d, failed: %d", imported, exported, added, total, failed))
if total != 0 {
f.Println(fmt.Sprintf("Progress update: %d (%d / %d) / %d, failed: %d", imported, exported, added, total, failed))
}
if progress.IsPaused() {
f.Printf("Transfer is paused bacause %s", progress.PauseReason())