mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
Unit tests for PUT object when object already exists (#1904)
* fs/xl tests for multiple put object requests * xl fix for put object on directory * Unit tests fix windows test issue.
This commit is contained in:
committed by
Harshavardhana
parent
80d83220ad
commit
4ee2136b28
@@ -649,9 +649,11 @@ func (xl xlObjects) CompleteMultipartUpload(bucket string, object string, upload
|
||||
|
||||
// Rename if an object already exists to temporary location.
|
||||
uniqueID := getUUID()
|
||||
err = xl.renameObject(bucket, object, minioMetaBucket, path.Join(tmpMetaPrefix, uniqueID))
|
||||
if err != nil {
|
||||
return "", toObjectErr(err, bucket, object)
|
||||
if xl.isObject(bucket, object) {
|
||||
err = xl.renameObject(bucket, object, minioMetaBucket, path.Join(tmpMetaPrefix, uniqueID))
|
||||
if err != nil {
|
||||
return "", toObjectErr(err, bucket, object)
|
||||
}
|
||||
}
|
||||
|
||||
// Remove parts that weren't present in CompleteMultipartUpload request.
|
||||
|
||||
Reference in New Issue
Block a user