Skip to content

Commit b3009dc

Browse files
committed
commit: minor fix on bug cut
1 parent 2ef563c commit b3009dc

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

commit.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,7 @@ func (c *Commit) IsImageFile(name string) bool {
8585
}
8686
buf := make([]byte, 1024)
8787
n, _ := dataRc.Read(buf)
88-
if n > 0 {
89-
buf = buf[:n]
90-
}
88+
buf = buf[:n]
9189
_, isImage := isImageFile(buf)
9290
return isImage
9391
}

git.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"time"
1111
)
1212

13-
const _VERSION = "0.4.1"
13+
const _VERSION = "0.4.2"
1414

1515
func Version() string {
1616
return _VERSION

0 commit comments

Comments
 (0)