From 09300bb3f78c1965e90f0e4efcff2b278eca2d8e Mon Sep 17 00:00:00 2001 From: "A. Murat Eren" Date: Mon, 6 Mar 2006 09:44:11 +0000 Subject: [PATCH] symlink'ler ile ilgili ufak bir duzeltme.. + ontanimli olarak copytree ile kopyalanan dizinler icerisindeki symlink'leri takip etme, symlink olarak kopyala. --- pisi/actionsapi/shelltools.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pisi/actionsapi/shelltools.py b/pisi/actionsapi/shelltools.py index 3678f8db..2df0172c 100644 --- a/pisi/actionsapi/shelltools.py +++ b/pisi/actionsapi/shelltools.py @@ -136,12 +136,14 @@ def copy(source, destination): if isFile(destination): os.remove(destination) os.symlink(os.readlink(filePath), destination) + else: + os.symlink(os.readlink(filePath), destination) elif isDirectory(filePath): copytree(filePath, destination) else: error(_('ActionsAPI [copy]: File %s does not exist.') % filePath) -def copytree(source, destination, sym = False): +def copytree(source, destination, sym = True): '''recursively copy an entire directory tree rooted at source''' if isDirectory(source): if os.path.exists(destination):