diff --git a/fsspec/asyn.py b/fsspec/asyn.py index bd7d92c09..360758ac6 100644 --- a/fsspec/asyn.py +++ b/fsspec/asyn.py @@ -781,6 +781,7 @@ async def _glob(self, path, maxdepth=None, **kwargs): min_idx = min(idx_star, idx_qmark, idx_brace) detail = kwargs.pop("detail", False) + withdirs = kwargs.pop("withdirs", True) if not has_magic(path): if await self._exists(path, **kwargs): @@ -810,7 +811,7 @@ async def _glob(self, path, maxdepth=None, **kwargs): depth = None allpaths = await self._find( - root, maxdepth=depth, withdirs=True, detail=True, **kwargs + root, maxdepth=depth, withdirs=withdirs, detail=True, **kwargs ) pattern = glob_translate(path + ("/" if ends_with_sep else ""))