Update site.py

pull/674/head
Mr Chen 5 months ago
parent 62223d53be
commit 74058243c6
  1. 20
      web/utils/site.py

@ -694,15 +694,17 @@ class sites(object):
dirnames = [] dirnames = []
dirnames.append('/') dirnames.append('/')
for filename in os.listdir(site_path):
try: if os.path.exists(site_path):
file_path = site_path + '/' + filename for filename in os.listdir(site_path):
if os.path.islink(file_path): try:
continue file_path = site_path + '/' + filename
if os.path.isdir(file_path): if os.path.islink(file_path):
dirnames.append('/' + filename) continue
except: if os.path.isdir(file_path):
pass dirnames.append('/' + filename)
except:
pass
data['dirs'] = dirnames data['dirs'] = dirnames
return data return data

Loading…
Cancel
Save