We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type: Bug
Component: S3
Describe the bug If the prefix resolves to / the ListObjectsV2Request is not listing any files
/
ListObjectsV2Request
Sample Just put a txt file into an s3 bucket and use s3://mybucket/*.txt - the prefix resolves to / and the file is not listed
s3://mybucket/*.txt
Solution Use && !optionalPrefix.get().equals("/") to not set the prefix if it is only /
&& !optionalPrefix.get().equals("/")
ListObjectsV2Request.Builder listObjectsV2RequestBuilder = ListObjectsV2Request.builder().bucket(s3BucketName); if (optionalPrefix.isPresent() && !optionalPrefix.get().equals("/")) { listObjectsV2RequestBuilder = listObjectsV2RequestBuilder.prefix(optionalPrefix.get()); } return listObjectsV2RequestBuilder;
The text was updated successfully, but these errors were encountered:
S3: Fix file listing if the prefix resolves to slash (#912)
53926a0
Fixes #900
Successfully merging a pull request may close this issue.
Type: Bug
Component:
S3
Describe the bug
If the prefix resolves to
/
theListObjectsV2Request
is not listing any filesSample
Just put a txt file into an s3 bucket and use
s3://mybucket/*.txt
- the prefix resolves to/
and the file is not listedSolution
Use
&& !optionalPrefix.get().equals("/")
to not set the prefix if it is only/
The text was updated successfully, but these errors were encountered: