zip downloads: make zip entries relative to the current dir when possible

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2022-09-19 17:06:42 +02:00
parent 554a1cb1f4
commit f19691250d
7 changed files with 40 additions and 20 deletions

View File

@@ -191,7 +191,7 @@ func ByteCountIEC(b int64) string {
}
func byteCount(b int64, unit int64, maxPrecision bool) string {
if b <= 0 {
if b <= 0 && maxPrecision {
return strconv.FormatInt(b, 10)
}
if b < unit {