From: duplo Date: Fri, 23 Apr 2010 11:11:09 +0000 (+0000) Subject: Fix existing directory problem with copytree. X-Git-Tag: 2.5.0~403 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=33c37d92a8aade0ec890a6dafeb1090946341332;p=bertos.git Fix existing directory problem with copytree. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3505 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BProject.py b/wizard/BProject.py index 3d0f5fec..77b85326 100644 --- a/wizard/BProject.py +++ b/wizard/BProject.py @@ -412,11 +412,11 @@ class BProject(object): project_related_stuff = ("cfg", "hw", self.infos["PROJECT_NAME"] + "_wiz.mk") + const.IGNORE_LIST for element in os.listdir(origin): if element not in project_related_stuff: - element = os.path.join(origin, element) - if os.path.isdir(element): - copytree.copytree(element, self.prjdir, ignore_list=const.IGNORE_LIST) + full_path = os.path.join(origin, element) + if os.path.isdir(full_path): + copytree.copytree(full_path, os.path.join(self.prjdir, element), ignore_list=const.IGNORE_LIST) else: - shutil.copy(element, self.prjdir) + shutil.copy(full_path, self.prjdir) def _setupAutoenabledParameters(self): for module, information in self.infos["MODULES"].items():