summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-19 21:13:38 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-19 21:13:38 +0800
commit91d769f327cadedc47756455870fe106d97371b7 (patch)
tree526c6ed8a14d8603e63518ad896d77f7a175997e /util
parent18356821195f4a79e8e8266b36f45c1b7d15315b (diff)
downloadpttbbs-91d769f327cadedc47756455870fe106d97371b7.tar
pttbbs-91d769f327cadedc47756455870fe106d97371b7.tar.gz
pttbbs-91d769f327cadedc47756455870fe106d97371b7.tar.bz2
pttbbs-91d769f327cadedc47756455870fe106d97371b7.tar.lz
pttbbs-91d769f327cadedc47756455870fe106d97371b7.tar.xz
pttbbs-91d769f327cadedc47756455870fe106d97371b7.tar.zst
pttbbs-91d769f327cadedc47756455870fe106d97371b7.zip
remove SR.*, cache of search, when expirePtt.save_title@2006
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2005 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r--util/expire.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/util/expire.c b/util/expire.c
index 19909e64..5afa48ef 100644
--- a/util/expire.c
+++ b/util/expire.c
@@ -27,7 +27,7 @@ void expire(life_t *brd)
{
fileheader_t head;
struct stat state;
- char lockfile[128], tmpfile[128], bakfile[128];
+ char lockfile[128], tmpfile[128], bakfile[128], cmd[256];
char fpath[128], index[128], *fname;
int total, bid;
int fd, fdr, fdw, done, keep;
@@ -38,10 +38,9 @@ void expire(life_t *brd)
if((bid = getbnum(brd->bname)) == 0 ||
strcmp(brd->bname, bcache[bid-1].brdname))
{
- char cmd[1024];
printf("no such board?: %s\n", brd->bname);
- sprintf(cmd, "mv %s/boards/%c/%s %s/boards.error/%s",
- BBSHOME, brd->bname[0], brd->bname, BBSHOME, brd->bname);
+ sprintf(cmd, "mv "BBSHOME"/boards/%c/%s "BBSHOME"/boards.error/%s",
+ brd->bname[0], brd->bname, brd->bname);
system(cmd);
return;
}
@@ -57,6 +56,9 @@ void expire(life_t *brd)
return;
}
#endif
+ sprintf(cmd, "rm -f "BBSHOME"/boards/%c/%s/SR.*",
+ brd->bname[0], brd->bname);//Ptt: clear buffer of search
+ system(cmd);
sprintf(index, "%s/%s/.DIR", bpath, brd->bname);
sprintf(lockfile, "%s.lock", index);