Repository: jclouds
Updated Branches:
  refs/heads/master 41ce90ec3 -> 22c789da9


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.


Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/22c789da
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/22c789da
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/22c789da

Branch: refs/heads/master
Commit: 22c789da9eebce8420d098f795ae4249e7608c95
Parents: 41ce90e
Author: Andrew Gaul <[email protected]>
Authored: Fri Nov 13 12:12:02 2015 -0800
Committer: Andrew Gaul <[email protected]>
Committed: Fri Nov 13 12:15:29 2015 -0800

----------------------------------------------------------------------
 .../openstack/swift/v1/blobstore/RegionScopedSwiftBlobStore.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jclouds/blob/22c789da/apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/blobstore/RegionScopedSwiftBlobStore.java
----------------------------------------------------------------------
diff --git 
a/apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/blobstore/RegionScopedSwiftBlobStore.java
 
b/apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/blobstore/RegionScopedSwiftBlobStore.java
index f63aedb..692401c 100644
--- 
a/apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/blobstore/RegionScopedSwiftBlobStore.java
+++ 
b/apis/openstack-swift/src/main/java/org/jclouds/openstack/swift/v1/blobstore/RegionScopedSwiftBlobStore.java
@@ -479,7 +479,7 @@ public class RegionScopedSwiftBlobStore implements 
BlobStore {
    public List<MultipartPart> listMultipartUpload(MultipartUpload mpu) {
       ImmutableList.Builder<MultipartPart> parts = ImmutableList.builder();
       PageSet<? extends StorageMetadata> pageSet = list(mpu.containerName(),
-            new 
ListContainerOptions().inDirectory(mpu.blobName()).recursive());
+            new ListContainerOptions().prefix(mpu.id() + "/"));
       // TODO: pagination
       for (StorageMetadata sm : pageSet) {
          int lastSlash = sm.getName().lastIndexOf('/');

Reply via email to