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

swift: Read metadata after Update or Put

Nick Craig-Wood5a8bce63536f
diff --git a/swift/swift.go b/swift/swift.go
index da0345acd..7dd722da5 100644
--- a/swift/swift.go
+++ b/swift/swift.go
@@ -409,6 +409,11 @@ func (o *FsObjectSwift) Update(in io.Reader, modTime time.Time, size int64) erro
m := swift.Metadata{}
m.SetModTime(modTime)
_, err := o.swift.c.ObjectPut(o.swift.container, o.swift.root+o.remote, in, true, "", "", m.ObjectHeaders())
+ if err != nil {
+ return err
+ }
+ // Read the metadata from the newly created object
+ err = o.readMetaData()
return err
}