Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

dropbox: go1.1 compatibility

Nick Craig-Wood2479ce2c8e02
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