From 3fec1cb20c598e4d47ba1ddbcad74d9a2d7271e5 Mon Sep 17 00:00:00 2001 From: duplo Date: Wed, 22 Apr 2009 15:39:25 +0000 Subject: [PATCH] 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 --- wizard/const.py | 6 +++--- wizard/copytree.py | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) 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 # @@ -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.? -- 2.25.1