From: arighi Date: Tue, 12 Oct 2010 16:13:36 +0000 (+0000) Subject: wizard: follow symlinks only under POSIX OSes X-Git-Tag: 2.6.0~5^2~99 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=fb256b1f08e223e61a6356714be40876a28eeab2;p=bertos.git wizard: follow symlinks only under POSIX OSes r4299 introduced a bug on non-POSIX environments, because the python's os.walk() doesn't recognize the followlinks keyboard. Use this option only when a POSIX OS is detected. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4421 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/plugins/codelite.py b/wizard/plugins/codelite.py index 19c5ac71..81403219 100644 --- a/wizard/plugins/codelite.py +++ b/wizard/plugins/codelite.py @@ -82,7 +82,12 @@ def findSources(path): if not path.endswith(os.sep): path += os.sep file_dict = {} - for root, dirs, files in os.walk(path, followlinks=True): + # also follow all symlinks under POSIX OSes + if os.name == 'posix': + file_list = os.walk(path, followlinks=True) + else: + file_list = os.walk(path) + for root, dirs, files in file_list: if root.find("svn") == -1: file_dict[root.replace(path, "")] = {"dirs": [], "files": []} for dir in dirs: