Handle empty list blobs with opaque markers (Azure)

Fixes #326.
pull/332/head
Andrew Gaul 2020-07-17 19:06:16 +09:00
rodzic 34b844fcaf
commit 0613da2fcb
1 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -1460,8 +1460,11 @@ public class S3ProxyHandler {
isListV2 ? "NextContinuationToken" : "NextMarker", isListV2 ? "NextContinuationToken" : "NextMarker",
encodeBlob(encodingType, nextMarker)); encodeBlob(encodingType, nextMarker));
if (Quirks.OPAQUE_MARKERS.contains(blobStoreType)) { if (Quirks.OPAQUE_MARKERS.contains(blobStoreType)) {
lastKeyToMarker.put(Maps.immutableEntry(containerName, StorageMetadata sm = Iterables.getLast(set, null);
Iterables.getLast(set).getName()), nextMarker); if (sm != null) {
lastKeyToMarker.put(Maps.immutableEntry(containerName,
sm.getName()), nextMarker);
}
} }
} else { } else {
writeSimpleElement(xml, "IsTruncated", "false"); writeSimpleElement(xml, "IsTruncated", "false");