|
|
@ -620,7 +620,7 @@ def isMount(path):
|
|
|
|
|
|
|
|
|
|
|
|
def commonPath(*paths):
|
|
|
|
def commonPath(*paths):
|
|
|
|
"""Return common path from list of 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],
|
|
|
|
res = map(lambda x:x[0],
|
|
|
|
filter(lambda x:filter(lambda y:x[0]==y,x[1:]),zip(*paths)))
|
|
|
|
filter(lambda x:filter(lambda y:x[0]==y,x[1:]),zip(*paths)))
|
|
|
|
return "/".join(res)
|
|
|
|
return "/".join(res)
|
|
|
|