diff --git a/src/datasets/utils/file_utils.py b/src/datasets/utils/file_utils.py index b418eb1193a..233624d7541 100644 --- a/src/datasets/utils/file_utils.py +++ b/src/datasets/utils/file_utils.py @@ -1146,7 +1146,7 @@ def _prepare_single_hop_path_and_storage_options( Storage options are formatted in the form {protocol: storage_options_for_protocol} """ token = None if download_config is None else download_config.token - if urlpath.startswith(config.HF_ENDPOINT) and "/resolve/" in urlpath: + if urlpath.startswith(config.HF_ENDPOINT): urlpath = "hf://" + urlpath[len(config.HF_ENDPOINT) + 1 :].replace("/resolve/", "@", 1) protocol = urlpath.split("://")[0] if "://" in urlpath else "file" if download_config is not None and protocol in download_config.storage_options: