diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-08-15 17:46:30 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-08-15 17:46:30 +0800 |
commit | 3c9dca6acad2addda7ca2404718e873cf6bc2558 (patch) | |
tree | 8812bea542aae9c25fbf95c2cd80a802e24c1921 | |
parent | 863d174dff1c6f542b92d766a99462bef319349a (diff) | |
download | pttbbs-3c9dca6acad2addda7ca2404718e873cf6bc2558.tar pttbbs-3c9dca6acad2addda7ca2404718e873cf6bc2558.tar.gz pttbbs-3c9dca6acad2addda7ca2404718e873cf6bc2558.tar.bz2 pttbbs-3c9dca6acad2addda7ca2404718e873cf6bc2558.tar.lz pttbbs-3c9dca6acad2addda7ca2404718e873cf6bc2558.tar.xz pttbbs-3c9dca6acad2addda7ca2404718e873cf6bc2558.tar.zst pttbbs-3c9dca6acad2addda7ca2404718e873cf6bc2558.zip |
load cache at first time
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@472 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/read.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pttbbs/mbbsd/read.c b/pttbbs/mbbsd/read.c index 33ea06b5..ec7efeb4 100644 --- a/pttbbs/mbbsd/read.c +++ b/pttbbs/mbbsd/read.c @@ -1,4 +1,4 @@ -/* $Id: read.c,v 1.13 2002/07/27 15:06:39 kcwu Exp $ */ +/* $Id: read.c,v 1.14 2002/08/15 09:46:30 in2 Exp $ */ #include "bbs.h" #define MAXPATHLEN 256 @@ -759,8 +759,12 @@ i_read(int cmdmode, char *direct, void (*dotitle) (), void (*doentry) (), onekey switch (mode) { case NEWDIRECT: /* 第一次載入此目錄 */ case DIRCHANGED: - if (bidcache > 0 && !(currmode & (MODE_SELECT | MODE_DIGEST))) - last_line = getbtotal(currbid); + if (bidcache > 0 && !(currmode & (MODE_SELECT | MODE_DIGEST))){ + if( (last_line = getbtotal(currbid)) == 0 ){ + setbtotal(currbid); + last_line = get_num_records(currdirect, FHSZ); + } + } else last_line = get_num_records(currdirect, FHSZ); |