Skip to content

Commit

Permalink
hdfs: fix uploading to the wrong object on Update with overriden remo…
Browse files Browse the repository at this point in the history
…te 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.

65b2e37 drive: fix incorrect remote after Update on object

This test was tripped by the hdfs backend and this patch fixes the
problem.
  • Loading branch information
ncw committed Sep 8, 2023
1 parent 08789a5 commit c935014
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/hdfs/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (o *Object) Open(ctx context.Context, options ...fs.OpenOption) (in io.Read

// Update object
func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) error {
realpath := o.fs.realpath(src.Remote())
realpath := o.fs.realpath(o.remote)
dirname := path.Dir(realpath)
fs.Debugf(o.fs, "update [%s]", realpath)

Expand Down

0 comments on commit c935014

Please sign in to comment.