This commit is contained in:
sushen339
2025-11-18 14:05:51 +08:00
parent fed71d17cf
commit e1ef100119
3 changed files with 42 additions and 12 deletions
+10 -2
View File
@@ -281,8 +281,16 @@ void show_persist_list(void) {
msg(C_CYAN, "=== 📋 本地持久化封禁列表 ===");
FILE *fp = fopen(PERSIST_FILE, "r");
if (!fp || fseek(fp, 0, SEEK_END) == 0) {
if (fp) fclose(fp);
if (!fp) {
printf("(暂无持久化记录)\n");
return;
}
/* 检查文件是否为空 */
fseek(fp, 0, SEEK_END);
long file_size = ftell(fp);
if (file_size <= 0) {
fclose(fp);
printf("(暂无持久化记录)\n");
return;
}