This commit is contained in:
Zack Scholl 2021-04-20 06:17:09 -07:00
parent 91a3dd5866
commit 10e37c0620
1 changed files with 3 additions and 1 deletions

View File

@ -24,6 +24,8 @@ import (
"github.com/schollz/mnemonicode"
)
var imohashFull = imohash.NewCustom(0, 0) // full hash
// Exists reports whether the named file or directory exists.
func Exists(name string) bool {
if _, err := os.Stat(name); err != nil {
@ -81,7 +83,7 @@ func MD5HashFile(fname string) (hash256 []byte, err error) {
// IMOHashFile returns imohash
func IMOHashFile(fname string) (hash []byte, err error) {
b, err := imohash.SumFile(fname)
b, err := imohashFull.SumFile(fname)
hash = b[:]
return
}