Sort folder lists in a case-insensitive manner across download manager, file monitor, and cache services

This commit is contained in:
Will Miao
2025-02-16 06:57:32 +08:00
parent c12d2ad59a
commit 1d91251e24
3 changed files with 4 additions and 5 deletions

View File

@@ -120,7 +120,7 @@ class LoraFileHandler(FileSystemEventHandler):
# 更新文件夹列表,包括新添加的文件夹
all_folders = set(cache.folders) | new_folders
cache.folders = sorted(list(all_folders))
cache.folders = sorted(list(all_folders), key=lambda x: x.lower())
except Exception as e:
logger.error(f"Error in process_changes: {e}")