[Downloader] Fix problem with copying directory tree. (#2690)

* fix(downloader): clear paths in `distutils.dir_util._path_created` before copying tree

fix #2685

* style(downloader): add comment about PR
This commit is contained in:
jack1142 2019-05-23 09:08:14 +02:00 committed by Michael H
parent c6c0165214
commit 51dcf65fd7

View File

@ -114,6 +114,8 @@ class Installable(RepoJSONMixin):
if self._location.is_file():
copy_func = shutil.copy2
else:
# clear copy_tree's cache to make sure missing directories are created (GH-2690)
distutils.dir_util._path_created = {}
copy_func = distutils.dir_util.copy_tree
# noinspection PyBroadException