mirror of https://github.com/minio/minio.git
fix: versionID and MTime for restored object (#12145)
Signed-off-by: Poorna Krishnamoorthy <poorna@minio.io>
This commit is contained in:
parent
edf7642b0c
commit
5d954ea228
|
@ -1518,7 +1518,12 @@ func (er erasureObjects) restoreTransitionedObject(ctx context.Context, bucket s
|
||||||
return setRestoreHeaderFn(oi, InvalidObjectState{Bucket: bucket, Object: object})
|
return setRestoreHeaderFn(oi, InvalidObjectState{Bucket: bucket, Object: object})
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = er.CompleteMultipartUpload(ctx, bucket, object, uploadID, uploadedParts, opts)
|
_, err = er.CompleteMultipartUpload(ctx, bucket, object, uploadID, uploadedParts, ObjectOptions{
|
||||||
|
VersionID: oi.VersionID,
|
||||||
|
MTime: oi.ModTime,
|
||||||
|
Versioned: globalBucketVersioningSys.Enabled(bucket),
|
||||||
|
VersionSuspended: globalBucketVersioningSys.Suspended(bucket),
|
||||||
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return setRestoreHeaderFn(oi, toObjectErr(err, minioMetaMultipartBucket, uploadIDPath))
|
return setRestoreHeaderFn(oi, toObjectErr(err, minioMetaMultipartBucket, uploadIDPath))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue