1
mirror of https://github.com/rclone/rclone synced 2024-12-27 19:43:48 +01:00

mountlib: pass options in fsys not as args

This commit is contained in:
Nick Craig-Wood 2017-05-08 17:52:09 +01:00
parent bc9856b570
commit d127d8686a
2 changed files with 3 additions and 3 deletions

View File

@ -165,7 +165,7 @@ func (f *File) OpenRead() (fh *ReadFileHandle, err error) {
}
fs.Debugf(o, "File.OpenRead")
fh, err = newReadFileHandle(f, o, f.d.fsys.noSeek)
fh, err = newReadFileHandle(f, o)
err = errors.Wrap(err, "open for read")
if err != nil {

View File

@ -21,7 +21,7 @@ type ReadFileHandle struct {
hash *fs.MultiHasher
}
func newReadFileHandle(f *File, o fs.Object, noSeek bool) (*ReadFileHandle, error) {
func newReadFileHandle(f *File, o fs.Object) (*ReadFileHandle, error) {
r, err := o.Open()
if err != nil {
return nil, err
@ -38,7 +38,7 @@ func newReadFileHandle(f *File, o fs.Object, noSeek bool) (*ReadFileHandle, erro
fh := &ReadFileHandle{
o: o,
r: fs.NewAccount(r, o).WithBuffer(), // account the transfer
noSeek: noSeek,
noSeek: f.d.fsys.noSeek,
file: f,
hash: hash,
}