cmd/restic: Remove trailing "..." from progress messages
These were added after message since the last refactor of the progress printing code. Also skips an allocation in the common case.
This commit is contained in:
parent
74f7fe2b98
commit
b7c990871f
1 changed files with 4 additions and 1 deletions
|
@ -58,7 +58,10 @@ func printProgress(status string, canUpdateStatus bool) {
|
|||
if w < 3 {
|
||||
status = termstatus.Truncate(status, w)
|
||||
} else {
|
||||
status = termstatus.Truncate(status, w-3) + "..."
|
||||
trunc := termstatus.Truncate(status, w-3)
|
||||
if len(trunc) < len(status) {
|
||||
status = trunc + "..."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue