mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Merge branch 'pretzel-branch' into 'dev'
Add improved swiftness in file loading functions. See merge request crafty-controller/crafty-commander!122
This commit is contained in:
commit
4276635449
@ -649,9 +649,9 @@ class Helpers:
|
||||
|
||||
@staticmethod
|
||||
def generate_tree(folder, output=""):
|
||||
for raw_filename in os.listdir(folder):
|
||||
filename = html.escape(raw_filename)
|
||||
rel = os.path.join(folder, raw_filename)
|
||||
for file in sorted(os.scandir(folder), key=lambda e: e.name):
|
||||
filename = html.escape(file.name)
|
||||
rel = os.path.join(folder, filename)
|
||||
if os.path.isdir(rel):
|
||||
output += \
|
||||
"""<li class="tree-item" data-path="{}">
|
||||
|
Loading…
Reference in New Issue
Block a user