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

backend/tardigrade: use negative offset

Caleb Casea1a41aa0c19f
diff --git a/backend/tardigrade/object.go b/backend/tardigrade/object.go
index 0f18e36dc..40e29b37d 100644
--- a/backend/tardigrade/object.go
+++ b/backend/tardigrade/object.go
@@ -148,13 +148,7 @@ func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (_ io.ReadC
case s && !e:
offset = opt.Start
case !s && e:
- object, err := o.fs.project.StatObject(ctx, bucketName, bucketPath)
- if err != nil {
- return nil, err
- }
-
- offset = object.System.ContentLength - opt.End
- length = opt.End
+ offset = -opt.End
}
case *fs.SeekOption:
offset = opt.Offset