1
0
mirror of https://github.com/go-gitea/git.git synced 2026-02-05 06:45:03 +01:00

commit: minor fix on bug cut

This commit is contained in:
Unknwon
2016-08-31 13:58:24 -07:00
parent 2ef563ccd1
commit b3009dc4f5
2 changed files with 2 additions and 4 deletions

View File

@@ -85,9 +85,7 @@ func (c *Commit) IsImageFile(name string) bool {
}
buf := make([]byte, 1024)
n, _ := dataRc.Read(buf)
if n > 0 {
buf = buf[:n]
}
buf = buf[:n]
_, isImage := isImageFile(buf)
return isImage
}