1
mirror of https://github.com/rclone/rclone synced 2024-11-30 09:10:05 +01:00

sftp: add missing interface check and fix About #3257

This bug was introduced as part of adding context to the backends and
slipped through the net because the About call did not have an
interface assertion in the sftp backend.

I checked there were no other missing interface assertions on all the
optional methods on all the backends.
This commit is contained in:
Nick Craig-Wood 2019-06-26 11:24:48 +01:00
parent 0cb7130dd2
commit a1840f6fc7

View File

@ -807,7 +807,7 @@ func (f *Fs) Hashes() hash.Set {
} }
// About gets usage stats // About gets usage stats
func (f *Fs) About() (*fs.Usage, error) { func (f *Fs) About(ctx context.Context) (*fs.Usage, error) {
c, err := f.getSftpConnection() c, err := f.getSftpConnection()
if err != nil { if err != nil {
return nil, errors.Wrap(err, "About get SFTP connection") return nil, errors.Wrap(err, "About get SFTP connection")
@ -1188,5 +1188,6 @@ var (
_ fs.PutStreamer = &Fs{} _ fs.PutStreamer = &Fs{}
_ fs.Mover = &Fs{} _ fs.Mover = &Fs{}
_ fs.DirMover = &Fs{} _ fs.DirMover = &Fs{}
_ fs.Abouter = &Fs{}
_ fs.Object = &Object{} _ fs.Object = &Object{}
) )