mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
hotfix for failed scandir
This commit is contained in:
parent
b3cb6006e9
commit
3e2d2c89ee
@ -653,9 +653,9 @@ class Helpers:
|
||||
|
||||
@staticmethod
|
||||
def generate_tree(folder, output=""):
|
||||
for file in sorted(os.scandir(folder), key=lambda e: e.name):
|
||||
filename = html.escape(file.name)
|
||||
rel = os.path.join(folder, filename)
|
||||
for raw_filename in os.listdir(folder):
|
||||
filename = html.escape(raw_filename)
|
||||
rel = os.path.join(folder, raw_filename)
|
||||
if os.path.isdir(rel):
|
||||
output += \
|
||||
"""<li class="tree-item" data-path="{}">
|
||||
|
@ -25,11 +25,9 @@ class HTTPHandlerPage(BaseHandler):
|
||||
def get(self, page):
|
||||
url = self.request.full_url
|
||||
port = 443
|
||||
print(url)
|
||||
if url[len(url)-1] == '/':
|
||||
url = url.strip(url[len(url)-1])
|
||||
url_list = url.split('/')
|
||||
print(url_list)
|
||||
if url_list[0] != "":
|
||||
primary_url = url_list[0] + ":"+str(port)+"/"
|
||||
backup_url = url_list[0] + ":" +str(helper.get_setting["https_port"]) +"/"
|
||||
|
Loading…
Reference in New Issue
Block a user