perf: validate config_path before checking existence (#6722)

Add a check for empty config_path in check_exist method
This commit is contained in:
LIghtJUNction
2026-03-23 19:04:07 +08:00
committed by GitHub
parent 31487995bb
commit a78a55bcc0

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)