diff options
author | Lauris BH <lauris@nix.lv> | 2017-04-20 05:38:56 +0300 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-04-20 10:38:56 +0800 |
commit | bb14c97d406e5ed49863c666897da890e600a3f3 (patch) | |
tree | 957ebcf35eb8ced70a8c3fe523037f8d0d8f6ff4 /routers/repo | |
parent | fa2a513c62910c133316472247121c5c562eaf60 (diff) | |
download | gitea-bb14c97d406e5ed49863c666897da890e600a3f3.tar.gz gitea-bb14c97d406e5ed49863c666897da890e600a3f3.zip |
Fix empty file download (#1506)
Diffstat (limited to 'routers/repo')
-rw-r--r-- | routers/repo/download.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/download.go b/routers/repo/download.go index 85e9fc64c9..8b1bb7f952 100644 --- a/routers/repo/download.go +++ b/routers/repo/download.go @@ -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] } |