From 91da0da183238ac58a0a6c9df09013eb88a5d9cc Mon Sep 17 00:00:00 2001 From: ebozduman Date: Wed, 18 Mar 2020 11:33:53 -0700 Subject: [PATCH] fix for incorrect mtime handling (#3121) --- cmd/client-fs.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/client-fs.go b/cmd/client-fs.go index d43ae58d..7d7de924 100644 --- a/cmd/client-fs.go +++ b/cmd/client-fs.go @@ -392,13 +392,13 @@ func (f *fsClient) put(reader io.Reader, size int64, metadata map[string][]strin return totalWritten, probe.NewError(e) } - ctime, e := strconv.ParseInt(attr["ctime"], 10, 64) + mtime, e := strconv.ParseInt(attr["mtime"], 10, 64) if e != nil { return totalWritten, probe.NewError(e) } - // Attempt to change the access, modify and change time - if e := os.Chtimes(objectPath, time.Unix(atime, 0), time.Unix(ctime, 0)); e != nil { + // Attempt to change the access and modify time + if e := os.Chtimes(objectPath, time.Unix(atime, 0), time.Unix(mtime, 0)); e != nil { return totalWritten, probe.NewError(e) } }