mirror of
https://github.com/rclone/rclone.git
synced 2025-06-24 14:01:31 +02:00
sftp: clear the cached hashes on object update
This commit is contained in:
parent
47eab397ba
commit
c6b844977a
@ -817,6 +817,9 @@ func (o *Object) Open(options ...fs.OpenOption) (in io.ReadCloser, err error) {
|
|||||||
|
|
||||||
// Update a remote sftp file using the data <in> and ModTime from <src>
|
// Update a remote sftp file using the data <in> and ModTime from <src>
|
||||||
func (o *Object) Update(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) error {
|
func (o *Object) Update(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) error {
|
||||||
|
// Clear the hash cache since we are about to update the object
|
||||||
|
o.md5sum = nil
|
||||||
|
o.sha1sum = nil
|
||||||
c, err := o.fs.getSftpConnection()
|
c, err := o.fs.getSftpConnection()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "Update")
|
return errors.Wrap(err, "Update")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user