diff --git a/routers/repo/download.go b/routers/repo/download.go index a1ad3effe..f5fa1fc44 100644 --- a/routers/repo/download.go +++ b/routers/repo/download.go @@ -18,7 +18,7 @@ import ( func ServeData(ctx *context.Context, name string, reader io.Reader) error { buf := make([]byte, 1024) n, _ := reader.Read(buf) - if n > 0 { + if n >= 0 { buf = buf[:n] }