fix(config): handle corrupted config file and improve encoding detection

This commit is contained in:
PeanutSplash
2026-03-03 22:49:03 +08:00
parent eb6471d42c
commit fd4a2fce31
4 changed files with 128 additions and 84 deletions

View File

@@ -118,6 +118,7 @@ def main():
with open(KEYS_FILE) as f:
keys = json.load(f)
keys.pop("_db_dir", None)
print(f"\n加载 {len(keys)} 个数据库密钥")
print(f"输出目录: {OUT_DIR}")
os.makedirs(OUT_DIR, exist_ok=True)