Skip to content

Conversation

mt-ob
Copy link
Collaborator

@mt-ob mt-ob commented Jun 3, 2025

No description provided.

@mt-ob mt-ob changed the title fix s3 list_recursive to exclude sibling directories with shared pref… fix s3 list_recursive to exclude sibling directories with shared prefixes Jun 3, 2025
@dotKokott
Copy link

This fix works for me @madhur-ob, thanks!

Looking forward to upgrade once that is merged :)

if not normalized_prefix.endswith("/"):
normalized_prefix += "/"
# Only include keys that are actually under our directory
if not (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This filters out an object with key exactly equal to ABC/ when listing prefix ABC/. In S3 key names can actually contain / so someone could create a file called ABC/ (it's weird but valid)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so is the recommended change just > to >= ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think that would work

@dotKokott
Copy link

Is there a way I can help to get this in?

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

Successfully merging this pull request may close these issues.

4 participants