From 5a8bce63536f324fc48c75f18e60f8332f3d092c Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 19 Jul 2014 12:36:56 +0100 Subject: [PATCH] swift: Read metadata after Update or Put --- swift/swift.go | 5 +++++ 1 file changed, 5 insertions(+) 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 }