File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1407,18 +1407,18 @@ def iterdir(
1407
1407
1408
1408
# Remote paths
1409
1409
fsspec = import_optional_dependency ("fsspec" , extra = scheme )
1410
- fs = fsspec .filesystem ( scheme )
1411
- path_without_scheme = fsspec . core . strip_protocol ( path_str )
1412
- if fs . isfile ( path_without_scheme ):
1410
+ fs , inner_path = fsspec .core . url_to_fs ( path_str )
1411
+ if fs . isfile ( inner_path ):
1412
+ path_obj = PurePosixPath ( inner_path )
1413
1413
if _match_file (
1414
- path_without_scheme ,
1414
+ inner_path ,
1415
1415
extensions ,
1416
1416
glob ,
1417
1417
):
1418
1418
return [path ]
1419
1419
1420
1420
result = []
1421
- for file in fs .ls (path_without_scheme , detail = True ):
1421
+ for file in fs .ls (inner_path , detail = True ):
1422
1422
if file ["type" ] == "file" :
1423
1423
path_obj = PurePosixPath (file ["name" ])
1424
1424
if _match_file (
You can’t perform that action at this time.
0 commit comments