Correct the bug of the copy of svn files
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 22 Apr 2009 15:39:25 +0000 (15:39 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Wed, 22 Apr 2009 15:39:25 +0000 (15:39 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2636 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/const.py
wizard/copytree.py

index f67b0bcdbaafd63875369fd626da05428023e442..0c43b1eb17f3bdfd4778a0b3b6b8a73d932107bf 100644 (file)
@@ -59,9 +59,9 @@ EXTENSION_FILTER = (
 )
 
 IGNORE_LIST = (
-    "*/.svn",
-    "*/CVS",
-    "*/.git",
+    ".svn",
+    "CVS",
+    ".git",
 )
 
 MODULE_DEFINITION = {
index 4e568dea3ff8c50fe1c645dc0506257f8f7a1b02..68aa223e86aaa27da86789704835c77d65e43292 100644 (file)
@@ -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.?