mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-04 05:45:05 +08:00
dir buttons start with / so only the correct dir will be shown and not dirs with a substrings as name from the dir
This commit is contained in:
parent
4afaaf8a02
commit
f6762d2ad9
@ -138,8 +138,9 @@ class ExtraNetworksPage:
|
||||
continue
|
||||
|
||||
subdir = os.path.abspath(x)[len(parentdir):].replace("\\", "/")
|
||||
while subdir.startswith("/"):
|
||||
subdir = subdir[1:]
|
||||
|
||||
if not subdir.startswith("/"):
|
||||
subdir = "/" + subdir
|
||||
|
||||
is_empty = len(os.listdir(x)) == 0
|
||||
if not is_empty and not subdir.endswith("/"):
|
||||
|
Loading…
Reference in New Issue
Block a user