Stop SetModTime losing metadata (eg X-Object-Manifest) - fixes #203

This commit is contained in:
Nick Craig-Wood 2015-11-08 20:45:42 +00:00
parent 3e68d485f2
commit 5bb76cc35c

View File

@ -517,6 +517,12 @@ func (o *Object) SetModTime(modTime time.Time) {
for k, v := range newHeaders {
(*o.headers)[k] = v
}
// Include any other metadata from request
for k, v := range *o.headers {
if strings.HasPrefix(k, "X-Object-") {
newHeaders[k] = v
}
}
err = o.fs.c.ObjectUpdate(o.fs.container, o.fs.root+o.remote, newHeaders)
if err != nil {
fs.Stats.Error()