File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -313,9 +313,10 @@ def __init__(
313313 if stream is None :
314314 fs_token_paths = fsspec .get_fs_token_paths (path , storage_options = storage_options )
315315 self ._fs : fsspec .AbstractFileSystem = fs_token_paths [0 ]
316- protocol = self ._fs .protocol if isinstance (self ._fs .protocol , str ) else self ._fs .protocol [- 1 ]
317316 self ._path = (
318- fs_token_paths [2 ][0 ] if not is_remote_filesystem (self ._fs ) else protocol + "://" + fs_token_paths [2 ][0 ]
317+ fs_token_paths [2 ][0 ]
318+ if not is_remote_filesystem (self ._fs )
319+ else self ._fs .unstrip_protocol (fs_token_paths [2 ][0 ])
319320 )
320321 self .stream = self ._fs .open (fs_token_paths [2 ][0 ], "wb" )
321322 self ._closable_stream = True
Original file line number Diff line number Diff line change @@ -329,8 +329,7 @@ def __init__(
329329 is_local = not is_remote_filesystem (self ._fs )
330330 path_join = os .path .join if is_local else posixpath .join
331331
332- protocol = self ._fs .protocol if isinstance (self ._fs .protocol , str ) else self ._fs .protocol [- 1 ]
333- self ._cache_dir_root = fs_token_paths [2 ][0 ] if is_local else protocol + "://" + fs_token_paths [2 ][0 ]
332+ self ._cache_dir_root = fs_token_paths [2 ][0 ] if is_local else self ._fs .unstrip_protocol (fs_token_paths [2 ][0 ])
334333 self ._cache_dir = self ._build_cache_dir ()
335334 self ._cache_downloaded_dir = (
336335 path_join (self ._cache_dir_root , config .DOWNLOADED_DATASETS_DIR )
You can’t perform that action at this time.
0 commit comments