Skip to content

Commit

Permalink
Align download_filename with cached_filename (#33214)
Browse files Browse the repository at this point in the history
* Align download_filename with cached_filename
  • Loading branch information
lyuwenyu authored Jun 1, 2021
1 parent b626791 commit 0192b82
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/paddle/hapi/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

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:
extraced_repo_name = cached_zipfile.infolist()[0].filename
Expand Down

0 comments on commit 0192b82

Please sign in to comment.