mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-04 05:45:05 +08:00
Merge pull request #10286 from catboxanon/patch/extra-networks-symlinks
Fix symlink scanning for extra networks
This commit is contained in:
commit
ba7ae7b948
@ -741,7 +741,7 @@ def walk_files(path, allowed_extensions=None):
|
|||||||
if allowed_extensions is not None:
|
if allowed_extensions is not None:
|
||||||
allowed_extensions = set(allowed_extensions)
|
allowed_extensions = set(allowed_extensions)
|
||||||
|
|
||||||
for root, _, files in os.walk(path):
|
for root, _, files in os.walk(path, followlinks=True):
|
||||||
for filename in files:
|
for filename in files:
|
||||||
if allowed_extensions is not None:
|
if allowed_extensions is not None:
|
||||||
_, ext = os.path.splitext(filename)
|
_, ext = os.path.splitext(filename)
|
||||||
|
@ -90,7 +90,7 @@ class ExtraNetworksPage:
|
|||||||
|
|
||||||
subdirs = {}
|
subdirs = {}
|
||||||
for parentdir in [os.path.abspath(x) for x in self.allowed_directories_for_previews()]:
|
for parentdir in [os.path.abspath(x) for x in self.allowed_directories_for_previews()]:
|
||||||
for root, dirs, _ in os.walk(parentdir):
|
for root, dirs, _ in os.walk(parentdir, followlinks=True):
|
||||||
for dirname in dirs:
|
for dirname in dirs:
|
||||||
x = os.path.join(root, dirname)
|
x = os.path.join(root, dirname)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user