add slash to non-empty dirs in extra networks interface

This commit is contained in:
AUTOMATIC 2023-02-19 12:09:25 +03:00
parent 66cfd1dcfc
commit fe46a08f52

View File

@ -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: