this works great and support long file names
This commit is contained in:
13
weed/filer2/abstract_sql/hashing.go
Normal file
13
weed/filer2/abstract_sql/hashing.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package abstract_sql
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"io"
|
||||
)
|
||||
|
||||
// returns a 128 bit hash
|
||||
func md5hash(dir string) []byte {
|
||||
h := md5.New()
|
||||
io.WriteString(h, dir)
|
||||
return h.Sum(nil)
|
||||
}
|
||||
Reference in New Issue
Block a user