Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

sftp: Ensure file hash checking is really disabled

Jon Fautleydedc7d885ce9
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")