mirror of
https://github.com/restic/restic.git
synced 2025-03-09 00:00:02 +01:00
Merge pull request #3778 from greatroar/ellipsis
cmd/restic: Remove trailing "..." from progress messages
This commit is contained in:
commit
0cb6b3d80a
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…
Add table
Reference in a new issue