forked from TrueCloudLab/rclone
pcloud: only use SHA1 hashes in EU region
Apparently only SHA1 hashes are supported in the EU region for pcloud. This has been confirmed by pCloud support. The EU regions also support SHA256 hashes which we don't support yet. https://forum.rclone.org/t/pcloud-to-local-no-hashes-in-common/19440
This commit is contained in:
parent
c3ac9319f4
commit
f43a9ac17e
4 changed files with 49 additions and 34 deletions
|
@ -884,6 +884,13 @@ func (f *Fs) About(ctx context.Context) (usage *fs.Usage, err error) {
|
|||
|
||||
// Hashes returns the supported hash sets.
|
||||
func (f *Fs) Hashes() hash.Set {
|
||||
// EU region supports SHA1 and SHA256 (but rclone doesn't
|
||||
// support SHA256 yet).
|
||||
//
|
||||
// https://forum.rclone.org/t/pcloud-to-local-no-hashes-in-common/19440
|
||||
if f.opt.Hostname == "eapi.pcloud.com" {
|
||||
return hash.Set(hash.SHA1)
|
||||
}
|
||||
return hash.Set(hash.MD5 | hash.SHA1)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue