From dedc7d885ce93c7d1dc4ba8d3f8c1d30211c9c5b Mon Sep 17 00:00:00 2001 From: Jon Fautley Date: Mon, 22 Oct 2018 11:01:41 +0100 Subject: [PATCH] sftp: Ensure file hash checking is really disabled --- backend/sftp/sftp.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/sftp/sftp.go b/backend/sftp/sftp.go index f2e5f868e..0d8ae45e0 100644 --- a/backend/sftp/sftp.go +++ b/backend/sftp/sftp.go @@ -769,6 +769,10 @@ func (o *Object) Hash(r hash.Type) (string, error) { return "", hash.ErrUnsupported } + if o.fs.opt.DisableHashCheck { + return "", nil + } + c, err := o.fs.getSftpConnection() if err != nil { return "", errors.Wrap(err, "Hash get SFTP connection")