From a3202356e67451f71867dd4a9c4ab675c576dddf Mon Sep 17 00:00:00 2001 From: QuantumGhost Date: Tue, 3 Jun 2025 17:40:31 +0800 Subject: [PATCH] fix(api): correct path retrieval in scan_extensions method The previous does not work when `cwd` is not `api`, switching to `__file__` fixes this. --- api/core/extension/extensible.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/core/extension/extensible.py b/api/core/extension/extensible.py index 231743bf2a..b5737accfe 100644 --- a/api/core/extension/extensible.py +++ b/api/core/extension/extensible.py @@ -42,7 +42,7 @@ class Extensible: position_map: dict[str, int] = {} # get the path of the current class - current_path = os.path.abspath(cls.__module__.replace(".", os.path.sep) + ".py") + current_path = os.path.abspath(__file__) current_dir_path = os.path.dirname(current_path) # traverse subdirectories