1
0
mirror of https://github.com/schollz/croc.git synced 2024-11-27 12:34:19 +03:00

reduce description lengths

This commit is contained in:
Zack 2024-05-22 10:10:55 -07:00
parent f6d862eac0
commit eb0909033e

View File

@ -1696,6 +1696,9 @@ func (c *Client) createEmptyFileAndFinish(fileInfo FileInfo, i int) (err error)
} else {
description = " " + description
}
if len(description) > 20 {
description = description[:17] + "..."
}
c.bar = progressbar.NewOptions64(1,
progressbar.OptionOnCompletion(func() {
c.fmtPrintUpdate()
@ -1872,6 +1875,9 @@ func (c *Client) setBar() {
} else if !c.Options.IsSender {
description = " " + description
}
if len(description) > 20 {
description = description[:17] + "..."
}
c.bar = progressbar.NewOptions64(
c.FilesToTransfer[c.FilesToTransferCurrentNum].Size,
progressbar.OptionOnCompletion(func() {