From b6722b83362e246f51a8397a94d21601176bc6d6 Mon Sep 17 00:00:00 2001 From: Julian_Chu Date: Tue, 7 Oct 2008 19:19:34 +0800 Subject: [PATCH] git.py : Let prunedir can make a difference between real dir and symbolic link --- lib/bb/fetch/git.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/lib/bb/fetch/git.py b/lib/bb/fetch/git.py index 774bd1a..37a84dd 100644 --- a/lib/bb/fetch/git.py +++ b/lib/bb/fetch/git.py @@ -34,7 +34,10 @@ def prunedir(topdir): for name in files: os.remove(os.path.join(root, name)) for name in dirs: - os.rmdir(os.path.join(root, name)) + if os.path.islink(os.path.join(root, name)): + os.remove(os.path.join(root, name)) + else: + os.rmdir(os.path.join(root, name)) class Git(Fetch): """Class to fetch a module or modules from git repositories""" -- 1.5.5.1