added back anchor and selfheal broken chunks
This commit is contained in:
parent
fd035148bb
commit
6122768619
8 changed files with 65 additions and 44 deletions
|
|
@ -129,13 +129,13 @@ const (
|
|||
func FileSize(s int64) string {
|
||||
switch {
|
||||
case s >= TiB:
|
||||
return strconv.Itoa(int(s/TiB)) + " TiB"
|
||||
return strconv.FormatFloat(float64(s)/TiB, 'f', 2, 64) + " TiB"
|
||||
case s >= GiB:
|
||||
return strconv.Itoa(int(s/GiB)) + " GiB"
|
||||
return strconv.FormatFloat(float64(s)/GiB, 'f', 2, 64) + " GiB"
|
||||
case s >= MiB:
|
||||
return strconv.Itoa(int(s/MiB)) + " MiB"
|
||||
return strconv.FormatFloat(float64(s)/MiB, 'f', 2, 64) + " MiB"
|
||||
case s >= KiB:
|
||||
return strconv.Itoa(int(s/KiB)) + " KiB"
|
||||
return strconv.FormatFloat(float64(s)/KiB, 'f', 2, 64) + " KiB"
|
||||
}
|
||||
return strconv.Itoa(int(s)) + " B"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue