mirror of https://github.com/schollz/croc.git
fix hash file error
This commit is contained in:
parent
7390e7ed45
commit
b45e625298
|
@ -52,11 +52,11 @@ func HashFile(fname string, algorithm string) (hash256 []byte, err error) {
|
|||
if fstats.Mode()&os.ModeSymlink != 0 {
|
||||
var target string
|
||||
target, err = os.Readlink(fname)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return []byte(SHA256(target)), nil
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
switch algorithm {
|
||||
case "imohash":
|
||||
return IMOHashFile(fname)
|
||||
|
|
Loading…
Reference in New Issue