@@ -219,17 +219,17 @@ async def exists(self, key: str) -> bool:
219219
220220 async def list (self ) -> AsyncGenerator [str , None ]:
221221 # docstring inherited
222- to_strip = str ( self .root ) + "/"
222+ to_strip = self .root . as_posix ( ) + "/"
223223 for p in list (self .root .rglob ("*" )):
224224 if p .is_file ():
225- yield str ( p ).replace (to_strip , "" )
225+ yield p . as_posix ( ).replace (to_strip , "" )
226226
227227 async def list_prefix (self , prefix : str ) -> AsyncGenerator [str , None ]:
228228 # docstring inherited
229- to_strip = os . path . join ( str ( self .root / prefix ))
229+ to_strip = ( self .root / prefix ). as_posix () + "/" # TODO: fixme in 2430
230230 for p in (self .root / prefix ).rglob ("*" ):
231231 if p .is_file ():
232- yield str ( p . relative_to ( to_strip ) )
232+ yield p . as_posix (). replace ( to_strip , "" )
233233
234234 async def list_dir (self , prefix : str ) -> AsyncGenerator [str , None ]:
235235 # docstring inherited
@@ -239,6 +239,6 @@ async def list_dir(self, prefix: str) -> AsyncGenerator[str, None]:
239239 try :
240240 key_iter = base .iterdir ()
241241 for key in key_iter :
242- yield str ( key ).replace (to_strip , "" )
242+ yield key . as_posix ( ).replace (to_strip , "" )
243243 except (FileNotFoundError , NotADirectoryError ):
244244 pass
0 commit comments