From: lottaviano Date: Mon, 31 Aug 2009 15:03:26 +0000 (+0000) Subject: Remove empty VDir in codelite projects. X-Git-Tag: 2.2.0~139 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=0b5e269f0571dac2454992b94b563f80c31291e1;p=bertos.git Remove empty VDir in codelite projects. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2829 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/plugins/codelite.py b/wizard/plugins/codelite.py index 9f4b2540..1789c520 100644 --- a/wizard/plugins/codelite.py +++ b/wizard/plugins/codelite.py @@ -63,12 +63,16 @@ def clFiles(file_dict, directory): directory as the base folder. """ filelist = [] - filelist.append("" %os.path.basename(directory)) + # Do not create an empty VDir. + # TODO: this is *really* ugly, but an empty VDir is worse + if directory: + filelist.append("" %os.path.basename(directory)) for f in file_dict[directory]["files"]: filelist.append("" %os.path.join(directory, f)) for d in file_dict[directory]["dirs"]: filelist += clFiles(file_dict, os.path.join(directory, d)) - filelist.append("") + if directory: + filelist.append("") return filelist def findSources(path):