mirror of
https://github.com/restic/restic.git
synced 2025-08-21 05:17:35 +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:
@@ -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 + "..."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user