mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
commit
df78f3333d
1 changed files with 3 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue