Skip to content

Commit

Permalink
Update site.py
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Dec 25, 2024
1 parent 62223d5 commit 7405824
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions web/utils/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,15 +694,17 @@ def getSiteRunPath(self, site_name, site_path):

dirnames = []
dirnames.append('/')
for filename in os.listdir(site_path):
try:
file_path = site_path + '/' + filename
if os.path.islink(file_path):
continue
if os.path.isdir(file_path):
dirnames.append('/' + filename)
except:
pass

if os.path.exists(site_path):
for filename in os.listdir(site_path):
try:
file_path = site_path + '/' + filename
if os.path.islink(file_path):
continue
if os.path.isdir(file_path):
dirnames.append('/' + filename)
except:
pass

data['dirs'] = dirnames
return data
Expand Down

0 comments on commit 7405824

Please sign in to comment.