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

swift: use FixRangeOption to fix 0 length files via the VFS

Nick Craig-Wood0be14120e495
diff --git a/backend/swift/swift.go b/backend/swift/swift.go
index 09b962419..b0431aeba 100644
--- a/backend/swift/swift.go
+++ b/backend/swift/swift.go
@@ -1028,6 +1028,7 @@ func (o *Object) Storable() bool {
// Open an object for read
func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (in io.ReadCloser, err error) {
+ fs.FixRangeOption(options, o.size)
headers := fs.OpenOptionHeaders(options)
_, isRanging := headers["Range"]
err = o.fs.pacer.Call(func() (bool, error) {