From 33c37d92a8aade0ec890a6dafeb1090946341332 Mon Sep 17 00:00:00 2001 From: duplo Date: Fri, 23 Apr 2010 11:11:09 +0000 Subject: [PATCH] Fix existing directory problem with copytree. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3505 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/BProject.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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(): -- 2.25.1