1
mirror of https://github.com/rclone/rclone synced 2024-12-26 18:23:45 +01:00

sftp: Ensure file hash checking is really disabled

This commit is contained in:
Jon Fautley 2018-10-22 11:01:41 +01:00 committed by Nick Craig-Wood
parent c5ac96e9e7
commit dedc7d885c

View File

@ -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")