Browse Source

util.py with filter to not include subdirs

master
Raphael Roberts 7 years ago
parent
commit
081eca085c
  1. 12
      util.py

12
util.py

@ -0,0 +1,12 @@
def pparent(paths):
paths = sorted(paths,key=len)
first = True
ret = []
while len(paths) > 0:
el1 = old_paths[0]
old_paths = paths[1:]
paths = []
for path in old_paths:
if not paths.startswith(el1):
paths.insert(0,path)
return ret
Loading…
Cancel
Save