summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/bbs.c1
-rw-r--r--mbbsd/cache.c11
2 files changed, 11 insertions, 1 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 7d9b75d9..4343cccb 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -2319,6 +2319,7 @@ push_bottom(int ent, fileheader_t * fhdr, char *direct)
char buf[256];
if ((currmode & MODE_DIGEST) || !(currmode & MODE_BOARD))
return DONOTHING;
+ setbottomtotal(currbid); // Ptt : will be remove when stable
num = getbottomtotal(currbid);
if(getans(fhdr->filemode & FILE_BOTTOM ?
"¨ú®ø¸m©³¤½§i?(y/N)":
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)