From 282da2001ee166794135534c3766a54c8009d2f2 Mon Sep 17 00:00:00 2001 From: Mike Hiretsky Date: Wed, 3 Nov 2010 15:58:50 +0300 Subject: [PATCH] Fix commonPath function. --- pym/cl_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/cl_utils.py b/pym/cl_utils.py index 4a4c380..4414794 100644 --- a/pym/cl_utils.py +++ b/pym/cl_utils.py @@ -620,7 +620,7 @@ def isMount(path): def commonPath(*paths): """Return common path from list of paths""" - paths = map(lambda x:os.path.abspath(x).split('/'),paths) + paths = map(lambda x:os.path.normpath(x).split('/'),paths) res = map(lambda x:x[0], filter(lambda x:filter(lambda y:x[0]==y,x[1:]),zip(*paths))) return "/".join(res)