From dcbf538416cc6288c42a8fba9b88d5a3b547fd4d Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 9 Aug 2017 12:58:48 +0100 Subject: [PATCH] dropbox: stop using deprecated API methods --- dropbox/dropbox.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dropbox/dropbox.go b/dropbox/dropbox.go index 30426011a..d77ae4d99 100644 --- a/dropbox/dropbox.go +++ b/dropbox/dropbox.go @@ -474,7 +474,7 @@ func (f *Fs) Mkdir(dir string) error { Path: root, } err = f.pacer.Call(func() (bool, error) { - _, err = f.srv.CreateFolder(&arg2) + _, err = f.srv.CreateFolderV2(&arg2) return shouldRetry(err) }) return err @@ -519,7 +519,7 @@ func (f *Fs) Rmdir(dir string) error { // remove it err = f.pacer.Call(func() (bool, error) { - _, err = f.srv.Delete(&files.DeleteArg{Path: root}) + _, err = f.srv.DeleteV2(&files.DeleteArg{Path: root}) return shouldRetry(err) }) return err @@ -587,7 +587,7 @@ func (f *Fs) Copy(src fs.Object, remote string) (fs.Object, error) { func (f *Fs) Purge() (err error) { // Let dropbox delete the filesystem tree err = f.pacer.Call(func() (bool, error) { - _, err = f.srv.Delete(&files.DeleteArg{Path: f.slashRoot}) + _, err = f.srv.DeleteV2(&files.DeleteArg{Path: f.slashRoot}) return shouldRetry(err) }) return err @@ -953,7 +953,7 @@ func (o *Object) Update(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOptio // Remove an object func (o *Object) Remove() (err error) { err = o.fs.pacer.CallNoRetry(func() (bool, error) { - _, err = o.fs.srv.Delete(&files.DeleteArg{Path: o.remotePath()}) + _, err = o.fs.srv.DeleteV2(&files.DeleteArg{Path: o.remotePath()}) return shouldRetry(err) }) return err