swift: Read metadata after Update or Put

This commit is contained in:
Nick Craig-Wood 2014-07-19 12:36:56 +01:00
parent f9b31591f9
commit 5a8bce6353

View File

@ -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
}