From 0327ff8f7ff0ada58b279d72e177c6dfa9ace233 Mon Sep 17 00:00:00 2001 From: Alexander Delius Date: Mon, 18 Dec 2023 13:00:27 +0100 Subject: [PATCH] Fix truncated ListObjects request handling with non-existing NextMarker (#1253) --- src/xml-parsers.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xml-parsers.js b/src/xml-parsers.js index 20b22f71..c8c9282f 100644 --- a/src/xml-parsers.js +++ b/src/xml-parsers.js @@ -195,6 +195,8 @@ export function parseListObjects(xml) { if (listBucketResult.NextMarker) { nextMarker = listBucketResult.NextMarker + } else if (isTruncated && result.objects.length > 0) { + nextMarker = result.objects[result.objects.length - 1].name } parseCommonPrefixesEntity(listBucketResult.CommonPrefixes) }