From 507cda8d599e4ea0d5f9dfe904cfcbf09d413f43 Mon Sep 17 00:00:00 2001 From: Mike Hiretsky Date: Fri, 17 Sep 2010 15:00:53 +0000 Subject: [PATCH] Fix pathJoin function error joining ("/directory,"/") --- pym/cl_utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pym/cl_utils.py b/pym/cl_utils.py index 5e50f65..90dd778 100644 --- a/pym/cl_utils.py +++ b/pym/cl_utils.py @@ -527,9 +527,10 @@ def pathJoin(*paths): if len(paths)==1: return paths[0] return os.path.join(paths[0], - reduce(os.path.join, - map(lambda x: x.startswith("/") and x[1:] or x, - paths[1:]),'')) + reduce(os.path.join, + filter(lambda x:x and x != "/", + map(lambda x: x.startswith("/") and x[1:] or x, + paths[1:])),'')) def getUserPassword(flag="dialog", pwDialog=False):