diff --git a/fsspec/asyn.py b/fsspec/asyn.py index ee71c35c4..d19836a1e 100644 --- a/fsspec/asyn.py +++ b/fsspec/asyn.py @@ -672,9 +672,9 @@ async def _sizes(self, paths, batch_size=None): [self._size(p) for p in paths], batch_size=batch_size ) - async def _exists(self, path): + async def _exists(self, path, **kwargs): try: - await self._info(path) + await self._info(path, **kwargs) return True except FileNotFoundError: return False @@ -760,11 +760,11 @@ async def _glob(self, path, maxdepth=None, **kwargs): detail = kwargs.pop("detail", False) if not has_magic(path): - if await self._exists(path): + if await self._exists(path, **kwargs): if not detail: return [path] else: - return {path: await self._info(path)} + return {path: await self._info(path, **kwargs)} else: if not detail: return [] # glob of non-existent returns empty diff --git a/fsspec/implementations/http.py b/fsspec/implementations/http.py index cdd84c5ce..bae1bb7a7 100644 --- a/fsspec/implementations/http.py +++ b/fsspec/implementations/http.py @@ -458,11 +458,11 @@ async def _glob(self, path, maxdepth=None, **kwargs): detail = kwargs.pop("detail", False) if not has_magic(path): - if await self._exists(path): + if await self._exists(path, **kwargs): if not detail: return [path] else: - return {path: await self._info(path)} + return {path: await self._info(path, **kwargs)} else: if not detail: return [] # glob of non-existent returns empty diff --git a/fsspec/spec.py b/fsspec/spec.py index dffbeb895..2641f82d8 100644 --- a/fsspec/spec.py +++ b/fsspec/spec.py @@ -574,11 +574,11 @@ def glob(self, path, maxdepth=None, **kwargs): detail = kwargs.pop("detail", False) if not has_magic(path): - if self.exists(path): + if self.exists(path, **kwargs): if not detail: return [path] else: - return {path: self.info(path)} + return {path: self.info(path, **kwargs)} else: if not detail: return [] # glob of non-existent returns empty