From 0b5e269f0571dac2454992b94b563f80c31291e1 Mon Sep 17 00:00:00 2001 From: lottaviano Date: Mon, 31 Aug 2009 15:03:26 +0000 Subject: [PATCH] Remove empty VDir in codelite projects. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2829 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/plugins/codelite.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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): -- 2.25.1