mirror of https://github.com/apache/jclouds.git
Use prefix instead of marker to list MPU parts
This commit is contained in:
parent
aade18b76d
commit
d109dd6326
|
@ -827,12 +827,9 @@ public final class LocalBlobStore implements BlobStore {
|
|||
public List<MultipartPart> listMultipartUpload(MultipartUpload mpu) {
|
||||
ImmutableList.Builder<MultipartPart> parts = ImmutableList.builder();
|
||||
PageSet<? extends StorageMetadata> pageSet = list(mpu.containerName(),
|
||||
new ListContainerOptions().afterMarker(mpu.blobName()));
|
||||
new ListContainerOptions().prefix(mpu.blobName() + "-").recursive());
|
||||
// TODO: pagination
|
||||
for (StorageMetadata sm : pageSet) {
|
||||
if (!sm.getName().startsWith(mpu.blobName() + "-")) {
|
||||
break;
|
||||
}
|
||||
int partNumber = Integer.parseInt(sm.getName().substring((mpu.blobName() + "-").length()));
|
||||
long partSize = -1; // TODO: could call getContentMetadata but did not above
|
||||
parts.add(MultipartPart.create(partNumber, partSize, sm.getETag()));
|
||||
|
|
Loading…
Reference in New Issue