do not save MTime in newMultipartUpload() to avoid side-affects (#17340)

This commit is contained in:
Harshavardhana
2023-06-02 14:38:09 -07:00
committed by GitHub
parent 68f80b5fe7
commit b210ea79bc
3 changed files with 3 additions and 3 deletions

View File

@@ -1462,6 +1462,8 @@ func (ri ReplicateObjectInfo) replicateAll(ctx context.Context, objectAPI Object
func replicateObjectWithMultipart(ctx context.Context, c *minio.Core, bucket, object string, r io.Reader, objInfo ObjectInfo, opts minio.PutObjectOptions) (err error) {
var uploadedParts []minio.CompletePart
// new multipart must not set mtime as it may lead to erroneous cleanups at various intervals.
opts.Internal.SourceMTime = time.Time{} // this value is saved properly in CompleteMultipartUpload()
uploadID, err := c.NewMultipartUpload(context.Background(), bucket, object, opts)
if err != nil {
return err