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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user