"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
storj: fix bucket creation on Move picked up by integration tests
Nick Craig-Wood6a759d936ac0
diff --git a/backend/storj/fs.go b/backend/storj/fs.goindex 97c126620..da37748b5 100644--- a/backend/storj/fs.go+++ b/backend/storj/fs.go@@ -705,7 +705,16 @@ func (f *Fs) Move(ctx context.Context, src fs.Object, remote string) (fs.Object,// Do the moveerr := f.project.MoveObject(ctx, srcBucket, srcKey, dstBucket, dstKey, &options)if err != nil {- return nil, fmt.Errorf("rename object failed: %w", err)+ // Make sure destination bucket exists+ _, err := f.project.EnsureBucket(ctx, dstBucket)+ if err != nil {+ return nil, fmt.Errorf("rename object failed to create destination bucket: %w", err)+ }+ // And try again+ err = f.project.MoveObject(ctx, srcBucket, srcKey, dstBucket, dstKey, &options)+ if err != nil {+ return nil, fmt.Errorf("rename object failed: %w", err)+ }}// Read the new object