mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
fix: the returned object key when object is directory (#13391)
This commit is contained in:
parent
a188554fe1
commit
ec0fee6208
@ -900,7 +900,11 @@ func (z *erasureServerPools) DeleteObjects(ctx context.Context, bucket string, o
|
|||||||
defer multiDeleteLock.Unlock(lkctx.Cancel)
|
defer multiDeleteLock.Unlock(lkctx.Cancel)
|
||||||
|
|
||||||
if z.SinglePool() {
|
if z.SinglePool() {
|
||||||
return z.serverPools[0].DeleteObjects(ctx, bucket, objects, opts)
|
deleteObjects, dErrs := z.serverPools[0].DeleteObjects(ctx, bucket, objects, opts)
|
||||||
|
for i := range deleteObjects {
|
||||||
|
deleteObjects[i].ObjectName = decodeDirObject(deleteObjects[i].ObjectName)
|
||||||
|
}
|
||||||
|
return deleteObjects, dErrs
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fetch location of up to 10 objects concurrently.
|
// Fetch location of up to 10 objects concurrently.
|
||||||
@ -954,6 +958,7 @@ func (z *erasureServerPools) DeleteObjects(ctx context.Context, bucket string, o
|
|||||||
if derr != nil {
|
if derr != nil {
|
||||||
derrs[orgIndexes[i]] = derr
|
derrs[orgIndexes[i]] = derr
|
||||||
}
|
}
|
||||||
|
deletedObjects[i].ObjectName = decodeDirObject(deletedObjects[i].ObjectName)
|
||||||
dobjects[orgIndexes[i]] = deletedObjects[i]
|
dobjects[orgIndexes[i]] = deletedObjects[i]
|
||||||
}
|
}
|
||||||
mu.Unlock()
|
mu.Unlock()
|
||||||
|
Loading…
Reference in New Issue
Block a user