only load *.conf files when including a folder

This commit is contained in:
ed 2023-02-05 00:01:10 +00:00
parent 76e5eeea3f
commit 4ad6e45216

View file

@ -1515,8 +1515,8 @@ def expand_config_file(ret: list[str], fp: str, ipath: str) -> None:
if os.path.isdir(fp): if os.path.isdir(fp):
for fn in sorted(os.listdir(fp)): for fn in sorted(os.listdir(fp)):
fp2 = os.path.join(fp, fn) fp2 = os.path.join(fp, fn)
if not os.path.isfile(fp2): if not fp2.endswith(".conf") or fp in ipath:
continue # dont recurse continue
expand_config_file(ret, fp2, ipath) expand_config_file(ret, fp2, ipath)
return return