未验证 提交 0192b82f 编写于 作者: W Wenyu 提交者: GitHub

Align download_filename with cached_filename (#33214)

* Align download_filename with cached_filename
上级 b6267919
...@@ -109,7 +109,9 @@ def _get_cache_or_reload(repo, force_reload, verbose=True, source='github'): ...@@ -109,7 +109,9 @@ def _get_cache_or_reload(repo, force_reload, verbose=True, source='github'):
url = _git_archive_link(repo_owner, repo_name, branch, source=source) url = _git_archive_link(repo_owner, repo_name, branch, source=source)
get_path_from_url(url, hub_dir, decompress=False) fpath = get_path_from_url(
url, hub_dir, check_exist=not force_reload, decompress=False)
shutil.move(fpath, cached_file)
with zipfile.ZipFile(cached_file) as cached_zipfile: with zipfile.ZipFile(cached_file) as cached_zipfile:
extraced_repo_name = cached_zipfile.infolist()[0].filename extraced_repo_name = cached_zipfile.infolist()[0].filename
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册