@ -404,20 +404,24 @@ func (api objectAPIHandlers) DeleteMultipleObjectsHandler(w http.ResponseWriter,
toNames := func ( input map [ string ] int ) ( output [ ] string ) {
toNames := func ( input map [ string ] int ) ( output [ ] string ) {
output = make ( [ ] string , len ( input ) )
output = make ( [ ] string , len ( input ) )
for name , index := range input {
idx := 0
output [ index ] = name
for name := range input {
output [ idx ] = name
idx ++
}
}
return
return
}
}
errs , err := deleteObjectsFn ( ctx , bucket , toNames ( objectsToDelete ) )
deleteList := toNames ( objectsToDelete )
errs , err := deleteObjectsFn ( ctx , bucket , deleteList )
if err != nil {
if err != nil {
writeErrorResponse ( ctx , w , toAPIError ( ctx , err ) , r . URL , guessIsBrowserReq ( r ) )
writeErrorResponse ( ctx , w , toAPIError ( ctx , err ) , r . URL , guessIsBrowserReq ( r ) )
return
return
}
}
for _ , index := range objectsToDelete {
for i , objName := range deleteList {
dErrs [ index ] = toAPIErrorCode ( ctx , errs [ index ] )
dIdx := objectsToDelete [ objName ]
dErrs [ dIdx ] = toAPIErrorCode ( ctx , errs [ i ] )
}
}
// Collect deleted objects and errors if any.
// Collect deleted objects and errors if any.