You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2016/11/10 07:18:15 UTC

camel git commit: add prefix verify when initialize the s3endpoint, in case some access key only have access to specific path

Repository: camel
Updated Branches:
  refs/heads/master 34fdcb3ca -> 8da876549


add prefix verify when initialize the s3endpoint, in case some access key only have access to specific path


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8da87654
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8da87654
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8da87654

Branch: refs/heads/master
Commit: 8da876549f6cd24a741de5519203d1f1a15ffe49
Parents: 34fdcb3
Author: darrenxyli <da...@gmail.com>
Authored: Wed Nov 9 19:05:23 2016 -0800
Committer: darrenxyli <da...@gmail.com>
Committed: Wed Nov 9 19:05:23 2016 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/camel/component/aws/s3/S3Endpoint.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/8da87654/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
index 038bc91..0c8bbcd 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
@@ -113,8 +113,10 @@ public class S3Endpoint extends ScheduledPollEndpoint {
         String bucketName = getConfiguration().getBucketName();
         LOG.trace("Querying whether bucket [{}] already exists...", bucketName);
 
+        String prefix = getConfiguration().getPrefix();
+
         try {
-            s3Client.listObjects(new ListObjectsRequest(bucketName, null, null, null, 0));
+            s3Client.listObjects(new ListObjectsRequest(bucketName, prefix, null, null, 0));
             LOG.trace("Bucket [{}] already exists", bucketName);
             return;
         } catch (AmazonServiceException ase) {