We've run into a reproducible issue where calling walk() on an S3 bucket causes infinite recursion if the bucket contains an object with the key /
This happens because:
- S3 allows an object to be created with the key /
- ls() returns it as a "directory" (i.e. common prefix /)
- walk() sees that as a subdirectory and recurses into it
- But that "subdirectory" is just the bucket root again → leading to infinite recursion
- This eventually leads to a RecursionError: maximum recursion depth exceeded.
Let us know if this is something you'd consider filtering out at the s3fs level. Happy to provide a test case or additional details!
Thanks for the great library 🙏