Browse Source

Fix empty file download (#1506)

tags/v1.2.0-rc1
Lauris BH Lunny Xiao 8 years ago
parent
commit
9320b1b81c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      routers/repo/download.go

+ 1
- 1
routers/repo/download.go View File

@@ -19,7 +19,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]
}



Loading…
Cancel
Save