summaryrefslogtreecommitdiffstats
path: root/mbbsd/cache.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-08 13:37:44 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-08 13:37:44 +0800
commit7b49f01537bef297dea74e3e1129a90594d955fb (patch)
tree847d2d1ac985e2a75954eae7eb228d7bd4c63dac /mbbsd/cache.c
parentb136074cbf3e7d666f511e9b233abc9587d05b3d (diff)
downloadpttbbs-7b49f01537bef297dea74e3e1129a90594d955fb.tar
pttbbs-7b49f01537bef297dea74e3e1129a90594d955fb.tar.gz
pttbbs-7b49f01537bef297dea74e3e1129a90594d955fb.tar.bz2
pttbbs-7b49f01537bef297dea74e3e1129a90594d955fb.tar.lz
pttbbs-7b49f01537bef297dea74e3e1129a90594d955fb.tar.xz
pttbbs-7b49f01537bef297dea74e3e1129a90594d955fb.tar.zst
pttbbs-7b49f01537bef297dea74e3e1129a90594d955fb.zip
push bottom complete
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1731 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/cache.c')
-rw-r--r--mbbsd/cache.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c
index 67864fa8..698da5c7 100644
--- a/mbbsd/cache.c
+++ b/mbbsd/cache.c
@@ -518,7 +518,7 @@ touchdircache(int bid)
#if DIRCACHESIZE
void
-load_fileheader_bottom_cache(int bid, char *direct)
+load_fileheader_bottom_cache(int bid, char *bottompath)
{
int num = getbtotal(bid), n_bottom = getbottomtotal(bid);
int n = num - DIRCACHESIZE + n_bottom + 1;
@@ -530,9 +530,7 @@ load_fileheader_bottom_cache(int bid, char *direct)
}
if(n_bottom)
{
- char path[256];
- sprintf(path, "%s.bottom", direct);
- get_records(path, &SHM->dircache[bid - 1][dirsize],
+ get_records(bottompath, &SHM->dircache[bid - 1][dirsize],
sizeof(fileheader_t), 1, n_bottom);
}
}
@@ -731,8 +729,9 @@ setbottomtotal(int bid)
{
boardheader_t *bh = getbcache(bid);
char genbuf[256];
- setbfile(genbuf, bh->brdname, ".BOTTOM");
+ setbfile(genbuf, bh->brdname, ".DIR.bottom");
SHM->n_bottom[bid-1]=get_num_records(genbuf, sizeof(fileheader_t));
+ load_fileheader_bottom_cache(currbid, genbuf);
}
void
setbtotal(int bid)