From 2479ce2c8e02bdb02213153dde7a29d4cb4aff82 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 19 Jul 2014 15:48:40 +0100 Subject: [PATCH] dropbox: go1.1 compatibility --- dropbox/dropbox.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dropbox/dropbox.go b/dropbox/dropbox.go index 24cbe98b3..2deaf1c79 100644 --- a/dropbox/dropbox.go +++ b/dropbox/dropbox.go @@ -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