Skip to content

Fix/listdir lstrip#3754

Closed
TomNicholas wants to merge 2 commits intozarr-developers:mainfrom
TomNicholas:fix/listdir-lstrip
Closed

Fix/listdir lstrip#3754
TomNicholas wants to merge 2 commits intozarr-developers:mainfrom
TomNicholas:fix/listdir-lstrip

Conversation

@TomNicholas
Copy link
Copy Markdown
Member

Closes #3753

TODO:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/user-guide/*.md
  • Changes documented as a new file in changes/
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

TomNicholas and others added 2 commits March 9, 2026 15:21
…elopers#3753)

ObjectStore.list_dir uses lstrip(prefix) which strips individual
characters rather than a prefix string, corrupting child directory
names when the prefix shares characters with them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
lstrip strips individual characters from the given set, not a prefix
string. This corrupted directory names when the prefix shared characters
with child names (e.g. "temp" → "emp" when prefix contained "t").

Fixes zarr-developers#3753

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@TomNicholas
Copy link
Copy Markdown
Member Author

oops this is a duplicate of #3657. But that fix has yet to be released.

@TomNicholas TomNicholas closed this Mar 9, 2026
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.

ObjectStore.list_dir corrupts directory names due to lstrip vs removeprefix

1 participant