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