mirror of
https://github.com/rclone/rclone.git
synced 2024-11-25 09:41:44 +08:00
crypt: fix uploads with --crypt-no-data-encryption
Before this change, when uploading to a crypt, the ObjectInfo accidentally used the encrypted size, not the unencrypted size when --crypt-no-data-encryption was set. Fixes #5498
This commit is contained in:
parent
1e7db7193e
commit
1cb31e8cc7
|
@ -999,6 +999,9 @@ func (o *ObjectInfo) Size() int64 {
|
||||||
if size < 0 {
|
if size < 0 {
|
||||||
return size
|
return size
|
||||||
}
|
}
|
||||||
|
if o.f.opt.NoDataEncryption {
|
||||||
|
return size
|
||||||
|
}
|
||||||
return o.f.cipher.EncryptedSize(size)
|
return o.f.cipher.EncryptedSize(size)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user