Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

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

Nick Craig-Woodc9350149d8b3
diff --git a/backend/hdfs/object.go b/backend/hdfs/object.go
index 976bc7f02..31c8282f8 100644
--- a/backend/hdfs/object.go
+++ b/backend/hdfs/object.go
@@ -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)