From b5bf819256c26843c46bbde0bd948b9b11d57bed Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 5 Jul 2017 22:16:07 +0100 Subject: [PATCH] acd,b2,crypt,drive: add missing upload options --- amazonclouddrive/amazonclouddrive.go | 2 +- b2/b2.go | 2 +- crypt/crypt.go | 2 +- drive/drive.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/amazonclouddrive/amazonclouddrive.go b/amazonclouddrive/amazonclouddrive.go index 3fd21909c..e42d13eb9 100644 --- a/amazonclouddrive/amazonclouddrive.go +++ b/amazonclouddrive/amazonclouddrive.go @@ -552,7 +552,7 @@ func (f *Fs) Put(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs. err := o.readMetaData() switch err { case nil: - return o, o.Update(in, src) + return o, o.Update(in, src, options...) case fs.ErrorObjectNotFound: // Not found so create it default: diff --git a/b2/b2.go b/b2/b2.go index d08dbb4a2..6a37712ee 100644 --- a/b2/b2.go +++ b/b2/b2.go @@ -699,7 +699,7 @@ func (f *Fs) Put(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs. fs: f, remote: src.Remote(), } - return fs, fs.Update(in, src) + return fs, fs.Update(in, src, options...) } // Mkdir creates the bucket if it doesn't exist diff --git a/crypt/crypt.go b/crypt/crypt.go index 84e660105..169feadc6 100644 --- a/crypt/crypt.go +++ b/crypt/crypt.go @@ -248,7 +248,7 @@ func (f *Fs) Put(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs. if err != nil { return nil, err } - o, err := f.Fs.Put(wrappedIn, f.newObjectInfo(src)) + o, err := f.Fs.Put(wrappedIn, f.newObjectInfo(src), options...) if err != nil { return nil, err } diff --git a/drive/drive.go b/drive/drive.go index 9ec3f0dee..244ebca60 100644 --- a/drive/drive.go +++ b/drive/drive.go @@ -673,10 +673,10 @@ func (f *Fs) Put(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (fs. exisitingObj, err := f.newObjectWithInfo(src.Remote(), nil) switch err { case nil: - return exisitingObj, exisitingObj.Update(in, src) + return exisitingObj, exisitingObj.Update(in, src, options...) case fs.ErrorObjectNotFound: // Not found so create it - return f.PutUnchecked(in, src) + return f.PutUnchecked(in, src, options...) default: return nil, err }