mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
perf: validate config_path before checking existence (#6722)
Add a check for empty config_path in check_exist method
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user