mirror of
https://github.com/rclone/rclone.git
synced 2024-11-30 12:34:04 +08:00
sftp: open files for update write only to fix AWS SFTP interop - fixes #3776
This commit is contained in:
parent
ef7ac088c0
commit
db39adeb3e
|
@ -1215,7 +1215,7 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "Update")
|
return errors.Wrap(err, "Update")
|
||||||
}
|
}
|
||||||
file, err := c.sftpClient.Create(o.path())
|
file, err := c.sftpClient.OpenFile(o.path(), os.O_WRONLY|os.O_CREATE|os.O_TRUNC)
|
||||||
o.fs.putSftpConnection(&c, err)
|
o.fs.putSftpConnection(&c, err)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "Update Create failed")
|
return errors.Wrap(err, "Update Create failed")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user