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

This commit is contained in:
Nick Craig-Wood 2019-08-03 17:45:14 +01:00
parent 95af1f9ccf
commit 0be14120e4

View File

@ -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) {