Skip to content

Prevent mode='r+' from creating new directories #3307

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dstansby
Copy link
Contributor

@dstansby dstansby commented Jul 29, 2025

Fixes #3295. I'm not sure if I came up with the most elegant solution, but I couldn't think of a way to solve this without passing the mode to LocalStore.open(). Other suggestions very welcome if anyone has any better ideas?

@github-actions github-actions bot added the needs release notes Automatically applied to PRs which haven't added release notes label Jul 29, 2025
@dstansby dstansby force-pushed the r+ branch 2 times, most recently from d84eada to ee21ccf Compare July 30, 2025 12:13
@dstansby dstansby added this to the 3.1.2 milestone Jul 30, 2025
@dstansby dstansby marked this pull request as ready for review August 4, 2025 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs release notes Automatically applied to PRs which haven't added release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using r+ mode with zarr.open creates an empty directory
1 participant