Commit 6f8d1b6e authored by Jean-Francois Dockes's avatar Jean-Francois Dockes
Browse files

When computing dirs for filtering, need to limit the replacement of the...

When computing dirs for filtering, need to limit the replacement of the top_path to 1, else for, e.g. /mnt, we end up replacing all / characters...
parent 8f470069
......@@ -125,7 +125,7 @@ def get_dirs(tops, depth):
dirs = dirs + glob.glob(top + '/*' * d)
dirs = filter(lambda f: os.path.isdir(f), dirs)
top_path = top.rsplit('/', 1)[0]
dirs = [w.replace(top_path+'/', '') for w in dirs]
dirs = [w.replace(top_path+'/', '', 1) for w in dirs]
v = v + dirs
return ['<all>'] + v
#}}}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment