File tree Expand file tree Collapse file tree
utils/src/com/cloud/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -339,18 +339,16 @@ public static List<S3ObjectSummary> getDirectory(final ClientOptions clientOptio
339339
340340 private static List <S3ObjectSummary > listDirectory (final String bucketName , final String directory , final AmazonS3 client ) {
341341
342- List <S3ObjectSummary > objects = new ArrayList <S3ObjectSummary >();
343- ListObjectsRequest listObjectsRequest = new ListObjectsRequest ().withBucketName (bucketName ).withPrefix (directory + SEPARATOR );
344- ObjectListing objectListing ;
345-
346- do {
347- objectListing = client .listObjects (listObjectsRequest );
348-
349- if (objectListing != null )
350- objects .addAll (objectListing .getObjectSummaries ());
351- listObjectsRequest .setMarker (objectListing .getNextMarker ());
352- } while (objectListing .isTruncated ());
353-
342+ List <S3ObjectSummary > objects = new ArrayList <S3ObjectSummary >();
343+ ListObjectsRequest listObjectsRequest = new ListObjectsRequest ().withBucketName (bucketName ).withPrefix (directory + SEPARATOR );
344+ ObjectListing objectListing ;
345+
346+ do {
347+ objectListing = client .listObjects (listObjectsRequest );
348+ if (objectListing != null )
349+ objects .addAll (objectListing .getObjectSummaries ());
350+ listObjectsRequest .setMarker (objectListing .getNextMarker ());
351+ } while (objectListing .isTruncated ());
354352 if (objects .isEmpty ()) {
355353 return emptyList ();
356354 }
You can’t perform that action at this time.
0 commit comments