From dff60ed3a5e7167a83a6b0ca449454c767712261 Mon Sep 17 00:00:00 2001 From: LIghtJUNction Date: Sat, 21 Mar 2026 03:49:46 +0800 Subject: [PATCH] Validate config_path before checking existence Add a check for empty config_path in check_exist method --- astrbot/core/config/astrbot_config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/astrbot/core/config/astrbot_config.py b/astrbot/core/config/astrbot_config.py index 6a415e56c9..77c298cac8 100644 --- a/astrbot/core/config/astrbot_config.py +++ b/astrbot/core/config/astrbot_config.py @@ -178,4 +178,6 @@ def __setattr__(self, key, value) -> None: self[key] = value def check_exist(self) -> bool: + if not self.config_path: # 加判空 + return False return os.path.exists(self.config_path)