mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
only load *.conf files when including a folder
This commit is contained in:
parent
76e5eeea3f
commit
4ad6e45216
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue