operations: re-work reopen framework so it can take a RangeOption #2252

This is in preparation for multipart downloads.
This commit is contained in:
Nick Craig-Wood
2019-05-11 23:35:19 +01:00
parent 7c4fe3eb75
commit 0655738da6
3 changed files with 130 additions and 100 deletions
+1 -1
View File
@@ -289,7 +289,7 @@ func Copy(f fs.Fs, dst fs.Object, remote string, src fs.Object) (newDst fs.Objec
// If can't server side copy, do it manually
if err == fs.ErrorCantCopy {
var in0 io.ReadCloser
in0, err = newReOpen(src, hashOption, fs.Config.LowLevelRetries)
in0, err = newReOpen(src, hashOption, nil, fs.Config.LowLevelRetries)
if err != nil {
err = errors.Wrap(err, "failed to open source object")
} else {