mirror of https://github.com/apache/jclouds.git
JCLOUDS-894: Use prefix when listing MPU on Swift
Previously we only used the blob name and not the blob name/slo/timestamp/part size cookie which yield extra parts when listing an MPU with parts from a previous MPU. Listing using the stricter prefix gives the expected results. Fixes andrewgaul/s3proxy#91.
This commit is contained in:
parent
41ce90ec36
commit
22c789da9e
|
@ -479,7 +479,7 @@ public class RegionScopedSwiftBlobStore implements BlobStore {
|
||||||
public List<MultipartPart> listMultipartUpload(MultipartUpload mpu) {
|
public List<MultipartPart> listMultipartUpload(MultipartUpload mpu) {
|
||||||
ImmutableList.Builder<MultipartPart> parts = ImmutableList.builder();
|
ImmutableList.Builder<MultipartPart> parts = ImmutableList.builder();
|
||||||
PageSet<? extends StorageMetadata> pageSet = list(mpu.containerName(),
|
PageSet<? extends StorageMetadata> pageSet = list(mpu.containerName(),
|
||||||
new ListContainerOptions().inDirectory(mpu.blobName()).recursive());
|
new ListContainerOptions().prefix(mpu.id() + "/"));
|
||||||
// TODO: pagination
|
// TODO: pagination
|
||||||
for (StorageMetadata sm : pageSet) {
|
for (StorageMetadata sm : pageSet) {
|
||||||
int lastSlash = sm.getName().lastIndexOf('/');
|
int lastSlash = sm.getName().lastIndexOf('/');
|
||||||
|
|
Loading…
Reference in New Issue