putio: fix uploading to the wrong object on Update with overriden remote name

In this commit we discovered a problem with objects being uploaded to
the incorrect object name. It added an integration test for the
problem.

65b2e378e0 drive: fix incorrect remote after Update on object

This test was tripped by the putio backend and this patch fixes the
problem.
This commit is contained in:
Nick Craig-Wood 2023-06-27 12:46:55 +01:00
parent a6acbd1844
commit d4cc3760e6
2 changed files with 5 additions and 2 deletions

View file

@ -275,7 +275,7 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
if err != nil {
return err
}
newObj, err := o.fs.PutUnchecked(ctx, in, src, options...)
newObj, err := o.fs.putUnchecked(ctx, in, src, o.remote, options...)
if err != nil {
return err
}