diff options
Diffstat (limited to 'vendor/code.gitea.io/git/commit.go')
-rw-r--r-- | vendor/code.gitea.io/git/commit.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vendor/code.gitea.io/git/commit.go b/vendor/code.gitea.io/git/commit.go index c295412381..299a2381b6 100644 --- a/vendor/code.gitea.io/git/commit.go +++ b/vendor/code.gitea.io/git/commit.go @@ -98,10 +98,11 @@ func (c *Commit) IsImageFile(name string) bool { return false } - dataRc, err := blob.Data() + dataRc, err := blob.DataAsync() if err != nil { return false } + defer dataRc.Close() buf := make([]byte, 1024) n, _ := dataRc.Read(buf) buf = buf[:n] |