"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
jottacloud: switch to new api root - fixes #4295 - also implement a very ugly workaround for the DirMove failures
buengese2c4f7b61c129
diff --git a/backend/jottacloud/jottacloud.go b/backend/jottacloud/jottacloud.goindex bd97a9996..9bd7b783a 100644--- a/backend/jottacloud/jottacloud.go+++ b/backend/jottacloud/jottacloud.go@@ -46,7 +46,7 @@ const (decayConstant = 2 // bigger for slower decay, exponentialdefaultDevice = "Jotta"defaultMountpoint = "Archive"- rootURL = "https://www.jottacloud.com/jfs/"+ rootURL = "https://jfs.jottacloud.com/jfs/"apiURL = "https://api.jottacloud.com/"baseURL = "https://www.jottacloud.com/"defaultTokenURL = "https://id.jottacloud.com/auth/realms/jottacloud/protocol/openid-connect/token"@@ -1088,7 +1088,8 @@ func (f *Fs) copyOrMove(ctx context.Context, method, src, dest string) (info *apvar resp *http.Responseerr = f.pacer.Call(func() (bool, error) {resp, err = f.srv.CallXML(ctx, &opts, nil, &info)- return shouldRetry(resp, err)+ retry, _ := shouldRetry(resp, err)+ return (retry && resp.StatusCode != 500), err})if err != nil {return nil, err@@ -1192,6 +1193,18 @@ func (f *Fs) DirMove(ctx context.Context, src fs.Fs, srcRemote, dstRemote string_, err = f.copyOrMove(ctx, "mvDir", path.Join(f.endpointURL, f.opt.Enc.FromStandardPath(srcPath))+"/", dstRemote)+ // surprise! jottacloud fucked up dirmove - the api spits out an error but+ // dir gets moved regardless+ if apiErr, ok := err.(*api.Error); ok {+ if apiErr.StatusCode == 500 {+ _, err := f.NewObject(ctx, dstRemote)+ if err == fs.ErrorNotAFile {+ log.Printf("FIXME: ignoring DirMove error - move succeeded anyway\n")+ return nil+ }+ return err+ }+ }if err != nil {return errors.Wrap(err, "couldn't move directory")}