Validate config_path before checking existence

Add check for empty config_path in check_exist method
This commit is contained in:
LIghtJUNction
2026-03-21 03:49:12 +08:00
committed by GitHub
parent 864a6851df
commit a710c06be2

View File

@@ -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)