2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-16 18:15:20 +00:00

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

View File

@ -58,7 +58,10 @@ func printProgress(status string, canUpdateStatus bool) {
if w < 3 { if w < 3 {
status = termstatus.Truncate(status, w) status = termstatus.Truncate(status, w)
} else { } else {
status = termstatus.Truncate(status, w-3) + "..." trunc := termstatus.Truncate(status, w-3)
if len(trunc) < len(status) {
status = trunc + "..."
}
} }
} }