practracker: Don't read editor temp files, attempt 2

(Or any files that start with "." or "#".)

Obviously correct changes to already-reviewed code.
This commit is contained in:
teor 2019-11-14 16:12:19 +10:00
parent b2b61b0268
commit 3b4a360ed0
No known key found for this signature in database
GPG Key ID: 10FEAA0E7075672A

View File

@ -33,11 +33,14 @@ def get_tor_c_files(tor_topdir, include_dirs=None):
# We only care about .c and .h files
if not (filename.endswith(".c") or filename.endswith(".h")):
continue
# Avoid editor temporary files
if filename.startswith("."):
continue
if filename in EXCLUDE_FILES:
continue
# Avoid editor temporary files
bname = os.path.basename(filename)
if bname.startswith("."):
continue
if bname.startswith("#"):
continue
full_path = os.path.join(root,filename)