Skip to content

Commit

Permalink
Handle empty list blobs with opaque markers (Azure)
Browse files Browse the repository at this point in the history
Fixes #326.
  • Loading branch information
gaul committed Jul 17, 2020
1 parent 34b844f commit 0613da2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/org/gaul/s3proxy/S3ProxyHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -1460,8 +1460,11 @@ private void handleBlobList(HttpServletRequest request,
isListV2 ? "NextContinuationToken" : "NextMarker",
encodeBlob(encodingType, nextMarker));
if (Quirks.OPAQUE_MARKERS.contains(blobStoreType)) {
lastKeyToMarker.put(Maps.immutableEntry(containerName,
Iterables.getLast(set).getName()), nextMarker);
StorageMetadata sm = Iterables.getLast(set, null);
if (sm != null) {
lastKeyToMarker.put(Maps.immutableEntry(containerName,
sm.getName()), nextMarker);
}
}
} else {
writeSimpleElement(xml, "IsTruncated", "false");
Expand Down

0 comments on commit 0613da2

Please sign in to comment.