Stop SetModTime losing metadata (eg X-Object-Manifest) - fixes #203
This commit is contained in:
parent
3e68d485f2
commit
5bb76cc35c
1 changed files with 6 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue