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

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