diff --git a/commit.go b/commit.go index f259aac..e16246f 100644 --- a/commit.go +++ b/commit.go @@ -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 } diff --git a/git.go b/git.go index 6114194..71a9a37 100644 --- a/git.go +++ b/git.go @@ -10,7 +10,7 @@ import ( "time" ) -const _VERSION = "0.4.1" +const _VERSION = "0.4.2" func Version() string { return _VERSION