skip file if file name isn't as expected (#5029)

This commit is contained in:
tundebabzy 2018-02-19 06:47:22 +01:00 committed by Rushabh Mehta
parent ef3a3fce9f
commit c33b3b25d4

View file

@ -237,7 +237,7 @@ class HelpDatabase(object):
# files not in index.txt
for f in os.listdir(path):
if not os.path.isdir(os.path.join(path, f)):
if not os.path.isdir(os.path.join(path, f)) and len(f.rsplit('.', 1)) == 2:
name, extn = f.rsplit('.', 1)
if name not in files \
and name != 'index' and extn in ('md', 'html'):