diff --git a/python/paddle/hapi/hub.py b/python/paddle/hapi/hub.py index 54765c1d4d41cb80c42690909d1bc743f33cbed0..243bd79c191dd6af08a0dae769ca2de630d42b40 100644 --- a/python/paddle/hapi/hub.py +++ b/python/paddle/hapi/hub.py @@ -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