Skip to content
New issue

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

ExtendedS3Storage: incorrect implementation of exists #4591

Closed
sachin-j-joshi opened this issue Mar 3, 2020 · 0 comments · Fixed by #4593
Closed

ExtendedS3Storage: incorrect implementation of exists #4591

sachin-j-joshi opened this issue Mar 3, 2020 · 0 comments · Fixed by #4593

Comments

@sachin-j-joshi
Copy link
Contributor

Problem description
Currently the ExtendedS3Storage implements exists() by calling listObjects with given path and checking whether list returned is empty or not.
For the path that corresponds with full path to the object this is correct. However this breaks when the path checked is a prefix. In this case list of other object matching that prefix will be returned and the code will incorrectly determine that object exists.

Problem location
ExtendedS3Storage . doExists

Suggestions for an improvement
Instead of listObjects use getObjectMetadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants