From a710c06be2280cbed06ac1924622ad7e3f657c67 Mon Sep 17 00:00:00 2001 From: LIghtJUNction Date: Sat, 21 Mar 2026 03:49:12 +0800 Subject: [PATCH] Validate config_path before checking existence Add 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 4aa92bc33..f1114a744 100644 --- a/astrbot/core/config/astrbot_config.py +++ b/astrbot/core/config/astrbot_config.py @@ -178,4 +178,6 @@ class AstrBotConfig(dict): self[key] = value def check_exist(self) -> bool: + if not self.config_path: # 加判空 + return False return os.path.exists(self.config_path)