mirror of
https://github.com/rclone/rclone.git
synced 2024-11-25 01:44:41 +01:00
Stop SetModTime losing metadata (eg X-Object-Manifest) - fixes #203
This commit is contained in:
parent
3e68d485f2
commit
5bb76cc35c
@ -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 New Issue
Block a user