summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-19 10:44:51 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-19 10:44:51 +0800
commit18356821195f4a79e8e8266b36f45c1b7d15315b (patch)
tree39d0411ee1de041e762e667e0f7d1daf391e5930 /mbbsd
parentf187c64d03772ebafd67b497080db42b508b66cf (diff)
downloadpttbbs-18356821195f4a79e8e8266b36f45c1b7d15315b.tar
pttbbs-18356821195f4a79e8e8266b36f45c1b7d15315b.tar.gz
pttbbs-18356821195f4a79e8e8266b36f45c1b7d15315b.tar.bz2
pttbbs-18356821195f4a79e8e8266b36f45c1b7d15315b.tar.lz
pttbbs-18356821195f4a79e8e8266b36f45c1b7d15315b.tar.xz
pttbbs-18356821195f4a79e8e8266b36f45c1b7d15315b.tar.zst
pttbbs-18356821195f4a79e8e8266b36f45c1b7d15315b.zip
debug truncate the SR.* files of select mode
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2004 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mbbsd/read.c b/mbbsd/read.c
index 58ec63ca..be6e681d 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -383,7 +383,7 @@ select_read(keeploc_t * locmem, int sr_mode)
setbfile(newdirect, currboard, genbuf);
if( now - dasht(newdirect) < 3600 )
- count = dashs(newdirect);
+ count = dashs(newdirect) / sizeof(fileheader_t);
else {
if( (fd = open(newdirect, O_CREAT | O_RDWR, 0600)) == -1 )
return READ_REDRAW;
@@ -415,6 +415,7 @@ select_read(keeploc_t * locmem, int sr_mode)
} // end while
close(fr);
}
+ ftruncate(fd, count*sizeof(fileheader_t));
close(fd);
}