Commit 9c90d7ed by Geoff Lang

Update enumerate_files.py to ignore "hidden" files.

Skip over files that begin with '.' since they are often hidden temporary files. BUG=angle:553 Change-Id: I74f8412e6959c49bfca7f0ae063af42027e12549 Reviewed-on: https://chromium-review.googlesource.com/188035Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent d51df461
...@@ -40,6 +40,10 @@ if len(types) == 0: ...@@ -40,6 +40,10 @@ if len(types) == 0:
for rootdir in dirs: for rootdir in dirs:
for root, dirnames, filenames in os.walk(rootdir): for root, dirnames, filenames in os.walk(rootdir):
for file in filenames: for file in filenames:
# Skip files that are "hidden"
if file.startswith("."):
continue;
fullPath = os.path.join(root, file).replace("\\", "/") fullPath = os.path.join(root, file).replace("\\", "/")
for type in types: for type in types:
if fnmatch.fnmatchcase(fullPath, type): if fnmatch.fnmatchcase(fullPath, type):
......
Markdown is supported
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