Merge pull request #3778 from greatroar/ellipsis

cmd/restic: Remove trailing "..." from progress messages
This commit is contained in:
MichaelEischer 2022-06-04 19:16:00 +02:00 committed by GitHub
commit 0cb6b3d80a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -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 + "..."
}
}
}