Commit 9c4c5617 authored by Carsten Emde's avatar Carsten Emde
Browse files

Fixed another problem in the skipdirs code

parent 309927e5
......@@ -464,9 +464,6 @@ def main(argv):
skipdirs += ',' + defaultskipdirs
skipdirs = skipdirs.split(',')
print("Info: Skipping directories %s" % (skipdirs))
for s in skipdirs:
if not s.endswith('/'):
skipdirs[skipdirs.index(s)] += '/'
for dirtoscan in dirstoscan:
# store the length of the top level directory, as everything
......@@ -480,9 +477,14 @@ def main(argv):
dirwalker = os.walk(dirtoscan)
for root, dirs, files in os.walk(dirtoscan, topdown = True):
try:
[dirs.remove(d) for d in list(dirs) for s in skipdirs if root.startswith(s)]
except:
mustskip = False
for s in skipdirs:
if root.startswith(s + '/') or root == s:
for d in dirs:
dirs.remove(d)
mustskip = True
break
if mustskip:
continue
for filename in files:
fullfilename = os.path.join(root, filename)
......
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