Merge branch 'hotfix/fix-file-sort'

This commit is contained in:
Manuel Schmid 2024-01-07 14:39:17 +01:00
commit 80b4c5d615
No known key found for this signature in database
GPG Key ID: 32C4F7569B40B84B
2 changed files with 4 additions and 3 deletions

View File

@ -164,14 +164,14 @@ def get_files_from_folder(folder_path, exensions=None, name_filter=None):
filenames = []
for root, dirs, files in os.walk(folder_path):
for root, dirs, files in os.walk(folder_path, topdown=False):
relative_path = os.path.relpath(root, folder_path)
if relative_path == ".":
relative_path = ""
for filename in files:
for filename in sorted(files):
_, file_extension = os.path.splitext(filename)
if (exensions == None or file_extension.lower() in exensions) and (name_filter == None or name_filter in _):
path = os.path.join(relative_path, filename)
filenames.append(path)
return sorted(filenames, key=lambda x: -1 if os.sep in x else 1)
return filenames

View File

@ -18,6 +18,7 @@ Included adjustments:
* ✨ show more details for each performance setting, e.g. steps
* ✨ add default_overwrite_step handling for meta data and gradio (allows turbo preset switching to set default_overwrite_step correctly)
* ✨ https://github.com/lllyasviel/Fooocus/pull/1762 - add style preview on mouseover
* 🐛 https://github.com/lllyasviel/Fooocus/pull/1784 - correctly sort files, display deepest directory level first
✨ = new feature<br>
🐛 = bugfix<br>