File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -161,12 +161,13 @@ async def _transform_list_dir(
161161 # We assume that the underlying object-store implementation correctly handles the
162162 # prefix, so we don't double-check that the returned results actually start with the
163163 # given prefix.
164- prefix_len = len (prefix )
164+ prefix_len = len (prefix ) + 1 # If one is not added to the length, all items will contain "/"
165165 async for batch in list_stream :
166166 for item in batch :
167- # Yield this item if "/" does not exist after the prefix.
168- if "/" not in item ["path" ][prefix_len :]:
169- yield item ["path" ]
167+ # Yield this item if "/" does not exist after the prefix
168+ item_path = item ["path" ][prefix_len :]
169+ if "/" not in item_path :
170+ yield item_path
170171
171172
172173class _BoundedRequest (TypedDict ):
You can’t perform that action at this time.
0 commit comments