added back anchor and selfheal broken chunks

This commit is contained in:
ston1th 2022-10-09 01:12:05 +02:00
commit 6122768619
8 changed files with 65 additions and 44 deletions

View file

@ -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"
}