sftp: add rclone to list of supported md5sum/sha1sum commands to look for

See #5781
This commit is contained in:
albertony 2021-11-03 01:07:36 +01:00
parent 29abbd2032
commit 00aafc957e

View File

@ -1155,8 +1155,8 @@ func (f *Fs) Hashes() hash.Set {
} }
changed := false changed := false
md5Works := checkHash([]string{"md5sum", "md5 -r"}, "d41d8cd98f00b204e9800998ecf8427e", &f.opt.Md5sumCommand, &changed) md5Works := checkHash([]string{"md5sum", "md5 -r", "rclone md5sum"}, "d41d8cd98f00b204e9800998ecf8427e", &f.opt.Md5sumCommand, &changed)
sha1Works := checkHash([]string{"sha1sum", "sha1 -r"}, "da39a3ee5e6b4b0d3255bfef95601890afd80709", &f.opt.Sha1sumCommand, &changed) sha1Works := checkHash([]string{"sha1sum", "sha1 -r", "rclone sha1sum"}, "da39a3ee5e6b4b0d3255bfef95601890afd80709", &f.opt.Sha1sumCommand, &changed)
if changed { if changed {
f.m.Set("md5sum_command", f.opt.Md5sumCommand) f.m.Set("md5sum_command", f.opt.Md5sumCommand)