From fe46a08f52c36ca61446f657296802ab3ceb2529 Mon Sep 17 00:00:00 2001 From: AUTOMATIC <16777216c@gmail.com> Date: Sun, 19 Feb 2023 12:09:25 +0300 Subject: [PATCH] add slash to non-empty dirs in extra networks interface --- modules/ui_extra_networks.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py index 90abec0a..30ceab4e 100644 --- a/modules/ui_extra_networks.py +++ b/modules/ui_extra_networks.py @@ -76,6 +76,10 @@ class ExtraNetworksPage: while subdir.startswith("/"): subdir = subdir[1:] + is_empty = len(os.listdir(x)) == 0 + if not is_empty and not subdir.endswith("/"): + subdir = subdir + "/" + subdirs[subdir] = 1 if subdirs: