mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-08 05:12:35 +00:00
only read files with .py extension from the scripts dir
This commit is contained in:
@@ -58,6 +58,9 @@ def load_scripts(basedir):
|
|||||||
for filename in sorted(os.listdir(basedir)):
|
for filename in sorted(os.listdir(basedir)):
|
||||||
path = os.path.join(basedir, filename)
|
path = os.path.join(basedir, filename)
|
||||||
|
|
||||||
|
if os.path.splitext(path)[1].lower() != '.py':
|
||||||
|
continue
|
||||||
|
|
||||||
if not os.path.isfile(path):
|
if not os.path.isfile(path):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user