From 6bfb91b539519f6524c3d4d95507855c475191f0 Mon Sep 17 00:00:00 2001 From: chrislu Date: Sat, 25 Mar 2023 22:02:57 -0700 Subject: [PATCH] update entry Attributes.Mtime = time.Now().Unix() fix https://github.com/seaweedfs/seaweedfs/issues/4337 --- weed/s3api/s3api_object_copy_handlers.go | 1 + 1 file changed, 1 insertion(+) diff --git a/weed/s3api/s3api_object_copy_handlers.go b/weed/s3api/s3api_object_copy_handlers.go index 83120ef07..881d840ee 100644 --- a/weed/s3api/s3api_object_copy_handlers.go +++ b/weed/s3api/s3api_object_copy_handlers.go @@ -46,6 +46,7 @@ func (s3a *S3ApiServer) CopyObjectHandler(w http.ResponseWriter, r *http.Request return } entry.Extended, err = processMetadataBytes(r.Header, entry.Extended, replaceMeta, replaceTagging) + entry.Attributes.Mtime = time.Now().Unix() if err != nil { glog.Errorf("CopyObjectHandler ValidateTags error %s: %v", r.URL, err) s3err.WriteErrorResponse(w, r, s3err.ErrInvalidTag)