diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-02-19 12:09:25 +0300 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-02-19 12:09:25 +0300 |
commit | fe46a08f52c36ca61446f657296802ab3ceb2529 (patch) | |
tree | 03b7c600e9c3de79f65545e6b84a503ff0e6e798 /modules/ui_extra_networks.py | |
parent | 66cfd1dcfc893a9051310c208a66890b86334118 (diff) |
add slash to non-empty dirs in extra networks interface
Diffstat (limited to 'modules/ui_extra_networks.py')
-rw-r--r-- | modules/ui_extra_networks.py | 4 |
1 files changed, 4 insertions, 0 deletions
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:
|