summaryrefslogtreecommitdiffstats
path: root/mbbsd/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/cache.c')
-rw-r--r--mbbsd/cache.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c
index 0d542ba5..b7ecb0be 100644
--- a/mbbsd/cache.c
+++ b/mbbsd/cache.c
@@ -655,8 +655,17 @@ setbottomtotal(int bid)
{
boardheader_t *bh = getbcache(bid);
char genbuf[256];
+ int n;
setbfile(genbuf, bh->brdname, ".DIR.bottom");
- SHM->n_bottom[bid-1]=get_num_records(genbuf, sizeof(fileheader_t));
+ n = get_num_records(genbuf, sizeof(fileheader_t));
+ if(n>5)
+ {
+ log_file("push_bottom.fix", genbuf, 1);
+ unlink(genbuf);
+ SHM->n_bottom[bid-1]=0;
+ }
+ else
+ SHM->n_bottom[bid-1]=n;
}
void
setbtotal(int bid)