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:
parent
bc9856b570
commit
d127d8686a
@ -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 {
|
||||
|
@ -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,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user