ffs
This commit is contained in:
parent
7b813ffb70
commit
471510f08e
1 changed files with 3 additions and 1 deletions
|
@ -61,9 +61,11 @@ class LocalStore(Store):
|
|||
if resp.status == 404:
|
||||
return None
|
||||
info = NarInfo.parse(await resp.text())
|
||||
return info._replace(url=base64.b64encode(info.storePath.encode("utf-8")).replace(b"/", b"_").decode("ascii"))
|
||||
return info._replace(url=base64.b64encode(info.storePath.encode("utf-8")).replace(b"/", b"_").decode("ascii")+".nar")
|
||||
|
||||
async def nar(self, sp: str) -> t.AsyncIterable[bytes]:
|
||||
if sp.endswith(".nar"):
|
||||
sp = sp[:-4]
|
||||
path = base64.b64decode(sp.replace("_", "/")).decode("utf-8")
|
||||
if not path.startswith((await self.cache_info()).storeDir):
|
||||
raise FileNotFoundError()
|
||||
|
|
Loading…
Reference in a new issue