Skip to content

Commit

Permalink
Fixed an error where 'get_origin_cache' was being called instead of '…
Browse files Browse the repository at this point in the history
…get_origin_url'
  • Loading branch information
turetske committed Sep 23, 2024
1 parent 55a7774 commit b4ac8ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pelicanfs/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,15 +524,15 @@ def _check_fspath(self, path: str) -> str:

def open(self, path, mode, **kwargs):
path = self._check_fspath(path)
data_url = sync(self.loop, self.get_origin_cache if self.directReads else self.get_working_cache, path)
data_url = sync(self.loop, self.get_origin_url if self.directReads else self.get_working_cache, path)
fp = self.httpFileSystem.open(data_url, mode, **kwargs)
fp.read = self._io_wrapper(fp.read)
return fp

async def open_async(self, path, **kwargs):
path = self._check_fspath(path)
if self.directReads:
data_url = await self.get_origin_cache(path)
data_url = await self.get_origin_url(path)
else:
data_url = self.get_working_cache(path)
fp = await self.httpFileSystem.open_async(data_url, **kwargs)
Expand Down

0 comments on commit b4ac8ef

Please sign in to comment.