mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
Merge branch 'hotfix/fix-file-sort'
This commit is contained in:
+3
-3
@@ -164,14 +164,14 @@ def get_files_from_folder(folder_path, exensions=None, name_filter=None):
|
|||||||
|
|
||||||
filenames = []
|
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)
|
relative_path = os.path.relpath(root, folder_path)
|
||||||
if relative_path == ".":
|
if relative_path == ".":
|
||||||
relative_path = ""
|
relative_path = ""
|
||||||
for filename in files:
|
for filename in sorted(files):
|
||||||
_, file_extension = os.path.splitext(filename)
|
_, file_extension = os.path.splitext(filename)
|
||||||
if (exensions == None or file_extension.lower() in exensions) and (name_filter == None or name_filter in _):
|
if (exensions == None or file_extension.lower() in exensions) and (name_filter == None or name_filter in _):
|
||||||
path = os.path.join(relative_path, filename)
|
path = os.path.join(relative_path, filename)
|
||||||
filenames.append(path)
|
filenames.append(path)
|
||||||
|
|
||||||
return sorted(filenames, key=lambda x: -1 if os.sep in x else 1)
|
return filenames
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ Included adjustments:
|
|||||||
* ✨ show more details for each performance setting, e.g. steps
|
* ✨ 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)
|
* ✨ 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/1762 - add style preview on mouseover
|
||||||
|
* 🐛 https://github.com/lllyasviel/Fooocus/pull/1784 - correctly sort files, display deepest directory level first
|
||||||
|
|
||||||
✨ = new feature<br>
|
✨ = new feature<br>
|
||||||
🐛 = bugfix<br>
|
🐛 = bugfix<br>
|
||||||
|
|||||||
Reference in New Issue
Block a user