diff --git a/pip/download.py b/pip/download.py index a083316464f..1a94a2dc3e9 100644 --- a/pip/download.py +++ b/pip/download.py @@ -694,9 +694,7 @@ def unpack_file_url(link, location, download_dir=None): # If it's a url to a local directory if os.path.isdir(link_path): - if os.path.isdir(location): - rmtree(location) - shutil.copytree(link_path, location, symlinks=True) + _copy_dist_from_dir(link_path, location) if download_dir: logger.info('Link is a directory, ignoring download_dir') return