mirror of
https://github.com/octoleo/restic.git
synced 2024-11-22 21:05:10 +00:00
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
@ -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 New Issue
Block a user