From 526e0aab9a4e8f04525ea62d0a23cea0d3b6149c Mon Sep 17 00:00:00 2001 From: Wu Clan Date: Tue, 8 Jul 2025 12:20:13 +0800 Subject: [PATCH] Optimize the analysis of get plugins (#716) * Optimize the analysis of get plugins * update var --- backend/plugin/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/plugin/tools.py b/backend/plugin/tools.py index 8c213d4a..f79f7885 100644 --- a/backend/plugin/tools.py +++ b/backend/plugin/tools.py @@ -46,7 +46,7 @@ def get_plugins() -> list[str]: # 遍历插件目录 for item in os.listdir(PLUGIN_DIR): - if item.endswith('.py') or item.endswith('backup') or item == '__pycache__': + if not os.path.isdir(os.path.join(PLUGIN_DIR, item)) and item == '__pycache__': continue item_path = os.path.join(PLUGIN_DIR, item)