"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
swift: Avoid unnecessary container versioning check
Joe Caia1e66cc5e84f
diff --git a/backend/swift/swift.go b/backend/swift/swift.goindex 6fbd740ec..d8ba99d73 100644--- a/backend/swift/swift.go+++ b/backend/swift/swift.go@@ -1531,12 +1531,14 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, opo.size = int64(inCount.BytesRead())}}- isInContainerVersioning, _ := o.isInContainerVersioning(ctx, container)// If file was a large object and the container is not enable versioning then remove old/all segments- if isLargeObject && len(segmentsContainer) > 0 && !isInContainerVersioning {- err := o.removeSegmentsLargeObject(ctx, segmentsContainer)- if err != nil {- fs.Logf(o, "Failed to remove old segments - carrying on with upload: %v", err)+ if isLargeObject && len(segmentsContainer) > 0 {+ isInContainerVersioning, _ := o.isInContainerVersioning(ctx, container)+ if !isInContainerVersioning {+ err := o.removeSegmentsLargeObject(ctx, segmentsContainer)+ if err != nil {+ fs.Logf(o, "Failed to remove old segments - carrying on with upload: %v", err)+ }}}