File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -399,7 +399,7 @@ async def delete_prefix(self, prefix: str) -> None:
399399 raise NotImplementedError
400400 self ._check_writable ()
401401 async for key in self .list_prefix (prefix ):
402- await self .delete (f" { key } " )
402+ await self .delete (key )
403403
404404 def close (self ) -> None :
405405 """Close the store."""
Original file line number Diff line number Diff line change @@ -227,8 +227,7 @@ async def list(self) -> AsyncGenerator[str, None]:
227227 async def list_prefix (self , prefix : str ) -> AsyncGenerator [str , None ]:
228228 # docstring inherited
229229 to_strip = str (self .root )
230- if prefix .endswith ("/" ):
231- prefix = prefix [:- 1 ]
230+ prefix = prefix .rstrip ("/" )
232231 for p in (self .root / prefix ).rglob ("*" ):
233232 if p .is_file ():
234233 yield str (p .relative_to (to_strip ))
You can’t perform that action at this time.
0 commit comments