forked from TrueCloudLab/restic
parent
eccbcb73a1
commit
4ec5050cbb
1 changed files with 7 additions and 3 deletions
|
@ -153,9 +153,13 @@ func (cmd CmdBackup) newArchiveProgress(todo restic.Stat) *restic.Progress {
|
||||||
|
|
||||||
w, _, err := terminal.GetSize(int(os.Stdout.Fd()))
|
w, _, err := terminal.GetSize(int(os.Stdout.Fd()))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if len(status1)+len(status2) > w {
|
maxlen := w - len(status2)
|
||||||
max := w - len(status2) - 4
|
|
||||||
status1 = status1[:max] + "... "
|
if maxlen < 4 {
|
||||||
|
status1 = ""
|
||||||
|
} else if len(status1) > maxlen {
|
||||||
|
status1 = status1[:maxlen-4]
|
||||||
|
status1 += "... "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue