From 24477ba0c97d7b1a0fc6d186e89e7418ec71931c Mon Sep 17 00:00:00 2001 From: KillianG Date: Mon, 18 Nov 2024 16:31:17 +0100 Subject: [PATCH] Even better optimize Issue: CLDSRV-570 --- lib/api/apiUtils/object/abortMultipartUpload.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/api/apiUtils/object/abortMultipartUpload.js b/lib/api/apiUtils/object/abortMultipartUpload.js index 633c726e72..c2f913ddea 100644 --- a/lib/api/apiUtils/object/abortMultipartUpload.js +++ b/lib/api/apiUtils/object/abortMultipartUpload.js @@ -104,7 +104,7 @@ function abortMultipartUpload(authInfo, bucketName, objectKey, uploadId, log, bucketName, objectKey, uploadId, - versionId: objectMD.versionId + versionId: objectMD.versionId, }); return metadata.deleteObjectMD(bucketName, objectKey, { versionId: objectMD.versionId }, log, err => { if (err) { @@ -129,7 +129,7 @@ function abortMultipartUpload(authInfo, bucketName, objectKey, uploadId, log, if (objectMD?.location) { const remainingObjectLocations = objectMD.location.filter(loc => !existingLocations.has(loc.key)); - locations = [...locations, ...remainingObjectLocations]; + locations.push(...remainingObjectLocations); } return async.eachLimit(locations, 5, (loc, cb) => {