From ecb3d3c0370b2bb7185a3824b8b694d6d04ee3c7 Mon Sep 17 00:00:00 2001 From: Zijian Hu Date: Tue, 25 Nov 2025 15:45:24 -0800 Subject: [PATCH] fix(async): fix _glob kwargs passing --- fsspec/asyn.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ""))