camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject camel git commit: add prefix verify when initialize the s3endpoint, in case some access key only have access to specific path
Date Thu, 10 Nov 2016 07:18:15 GMT
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 <darren.xyli@gmail.com>
Authored: Wed Nov 9 19:05:23 2016 -0800
Committer: darrenxyli <darren.xyli@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) {


Mime
View raw message