From 1c472348b652367f6e09dcd52db94f8a7078d9c7 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 19 Jul 2014 12:37:11 +0100 Subject: [PATCH] s3: Read metadata after Update or Put --- s3/s3.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/s3/s3.go b/s3/s3.go index 45a543b36..dc847b609 100644 --- a/s3/s3.go +++ b/s3/s3.go @@ -514,6 +514,11 @@ func (o *FsObjectS3) Update(in io.Reader, modTime time.Time, size int64) error { } _, err := o.s3.b.PutReaderHeaders(o.s3.root+o.remote, in, size, contentType, o.s3.perm, headers) + if err != nil { + return err + } + // Read the metadata from the newly created object + err = o.readMetaData() return err }