Skip to content

Commit bb14c97

Browse files
lafrikslunny
authored andcommitted
Fix empty file download (#1506)
1 parent fa2a513 commit bb14c97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/repo/download.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
func ServeData(ctx *context.Context, name string, reader io.Reader) error {
2020
buf := make([]byte, 1024)
2121
n, _ := reader.Read(buf)
22-
if n > 0 {
22+
if n >= 0 {
2323
buf = buf[:n]
2424
}
2525

0 commit comments

Comments
 (0)