You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by re...@apache.org on 2015/08/04 13:53:29 UTC
[1/2] git commit: updated refs/heads/master to 7b47c49
Repository: cloudstack
Updated Branches:
refs/heads/master ab4d9fc06 -> 7b47c49bb
CLOUDSTACK-8703: Fixed issue when listing directory on S3, it would only return objectSummaries when the anwser from the S3 System was truncated.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5f87e9c9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5f87e9c9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5f87e9c9
Branch: refs/heads/master
Commit: 5f87e9c917faa3f7d1d8b8d3f73f569e83d7bc2d
Parents: c5ebb68
Author: Boris Schrijver <bo...@pcextreme.nl>
Authored: Mon Aug 3 17:10:05 2015 +0200
Committer: Boris Schrijver <bo...@pcextreme.nl>
Committed: Mon Aug 3 17:10:05 2015 +0200
----------------------------------------------------------------------
utils/src/com/cloud/utils/S3Utils.java | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f87e9c9/utils/src/com/cloud/utils/S3Utils.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/S3Utils.java b/utils/src/com/cloud/utils/S3Utils.java
index fc8a3cc..e8653a6 100644
--- a/utils/src/com/cloud/utils/S3Utils.java
+++ b/utils/src/com/cloud/utils/S3Utils.java
@@ -352,10 +352,15 @@ public final class S3Utils {
ListObjectsRequest listObjectsRequest = new ListObjectsRequest().withBucketName(bucketName).withPrefix(directory + SEPARATOR);
ObjectListing ol = client.listObjects(listObjectsRequest);
- while (ol != null && ol.isTruncated()) {
+ if(ol.isTruncated()) {
+ do {
+ objects.addAll(ol.getObjectSummaries());
+ listObjectsRequest.setMarker(ol.getNextMarker());
+ ol = client.listObjects(listObjectsRequest);
+ } while (ol.isTruncated());
+ }
+ else {
objects.addAll(ol.getObjectSummaries());
- listObjectsRequest.setMarker(ol.getNextMarker());
- ol = client.listObjects(listObjectsRequest);
}
if (objects.isEmpty()) {
[2/2] git commit: updated refs/heads/master to 7b47c49
Posted by re...@apache.org.
#651 (@borisroman) CLOUDSTACK-8703: Fixed issue when listing direct..
* pr/651:
CLOUDSTACK-8703: Fixed issue when listing directory on S3, it would only return objectSummaries when the anwser from the S3 System was truncated.
Signed-off-by: Remi Bergsma <gi...@remi.nl>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7b47c49b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7b47c49b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7b47c49b
Branch: refs/heads/master
Commit: 7b47c49bb060df431bc2ea67403e19cc322befe0
Parents: ab4d9fc 5f87e9c
Author: Remi Bergsma <gi...@remi.nl>
Authored: Tue Aug 4 13:50:29 2015 +0200
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Tue Aug 4 13:50:29 2015 +0200
----------------------------------------------------------------------
utils/src/com/cloud/utils/S3Utils.java | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7b47c49b/utils/src/com/cloud/utils/S3Utils.java
----------------------------------------------------------------------