From: duplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Date: Wed, 22 Apr 2009 15:39:25 +0000 (+0000)
Subject: Correct the bug of the copy of svn files
X-Git-Tag: 2.1.0~46
X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=3fec1cb20c598e4d47ba1ddbcad74d9a2d7271e5;p=bertos.git

Correct the bug of the copy of svn files

git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2636 38d2e660-2303-0410-9eaa-f027e97ec537
---

diff --git a/wizard/const.py b/wizard/const.py
index f67b0bcd..0c43b1eb 100644
--- a/wizard/const.py
+++ b/wizard/const.py
@@ -59,9 +59,9 @@ EXTENSION_FILTER = (
 )
 
 IGNORE_LIST = (
-    "*/.svn",
-    "*/CVS",
-    "*/.git",
+    ".svn",
+    "CVS",
+    ".git",
 )
 
 MODULE_DEFINITION = {
diff --git a/wizard/copytree.py b/wizard/copytree.py
index 4e568dea..68aa223e 100644
--- a/wizard/copytree.py
+++ b/wizard/copytree.py
@@ -4,7 +4,7 @@
 # Copyright 2009 Develer S.r.l. (http://www.develer.com/)
 # All rights reserved.
 #
-# $Id:$
+# $Id$
 #
 # Author: Lorenzo Berni <duplo@develer.com>
 #
@@ -13,6 +13,8 @@ import os
 import fnmatch
 from shutil import *
 
+del copytree
+
 def copytree(src, dst, symlinks=False, ignore_list=[]):
     """
     Reimplementation of the shutil.copytree function that use ignore_list.
@@ -27,7 +29,7 @@ def copytree(src, dst, symlinks=False, ignore_list=[]):
         try:
             ignored = False
             for ignore in ignore_list:
-                if fnmatch.fnmatch(srcname, ignore):
+                if fnmatch.fnmatch(name, ignore):
                     ignored = True
                     break
             if ignored:
@@ -36,7 +38,7 @@ def copytree(src, dst, symlinks=False, ignore_list=[]):
                 linkto = os.readlink(srcname)
                 os.symlink(linkto, dstname)
             elif os.path.isdir(srcname):
-                copytree(srcname, dstname, symlinks)
+                copytree(srcname, dstname, symlinks, ignore_list)
             else:
                 copy2(srcname, dstname)
             # XXX What about devices, sockets etc.?