Skip to content

Commit 80e8182

Browse files
committed
Get bucket name directly from path to avoid calling 'listBuckets'
1 parent 4731fa1 commit 80e8182

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/carlspring/cloud/storage/s3fs/S3SeekableByteChannel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ else if (!exists && !this.options.contains(StandardOpenOption.CREATE_NEW) && !th
8282
if (exists)
8383
{
8484
final S3Client client = path.getFileSystem().getClient();
85-
final String bucketName = path.getFileStore().getBucket().name();
85+
final String bucketName = path.getBucketName();
8686
final GetObjectRequest request = GetObjectRequest.builder()
8787
.bucket(bucketName)
8888
.key(key)

0 commit comments

Comments
 (0)