Skip to content

LocalStore.empty() is True if there are empty directories #2218

Closed
@dcherian

Description

@dcherian

Zarr version

v3

Numcodecs version

?

Python Version

?

Operating System

?

Installation

?

Description

This should ignore empty directories but doesn't

async def empty(self) -> bool:
try:
subpaths = os.listdir(self.root)
except FileNotFoundError:
return True
else:
return not subpaths

Steps to reproduce

Discovered in #2202

Additional output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPotential issues with the zarr-python library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions