dropbox: go1.1 compatibility

This commit is contained in:
Nick Craig-Wood 2014-07-19 15:48:40 +01:00
parent 9aa4b6bd9b
commit 2479ce2c8e
1 changed files with 3 additions and 1 deletions

View File

@ -573,7 +573,9 @@ func (o *FsObjectDropbox) remotePath() string {
func metadataKey(path string) string {
// NB File system is case insensitive
path = strings.ToLower(path)
return fmt.Sprintf("%x", md5.Sum([]byte(path)))
hash := md5.New()
hash.Write([]byte(path))
return fmt.Sprintf("%x", hash.Sum(nil))
}
// Returns the key for the metadata database