summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-04-16 18:07:19 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-04-16 18:07:19 +0800
commitd8ab24df1d1aa454e23d7ee162c160c27958192b (patch)
treef5b169e19cee14744bd8ec9186721f85e032e075
parentc0bdb92ced5b2911d800fb3920e252a50e25dc9d (diff)
downloadpttbbs-d8ab24df1d1aa454e23d7ee162c160c27958192b.tar
pttbbs-d8ab24df1d1aa454e23d7ee162c160c27958192b.tar.gz
pttbbs-d8ab24df1d1aa454e23d7ee162c160c27958192b.tar.bz2
pttbbs-d8ab24df1d1aa454e23d7ee162c160c27958192b.tar.lz
pttbbs-d8ab24df1d1aa454e23d7ee162c160c27958192b.tar.xz
pttbbs-d8ab24df1d1aa454e23d7ee162c160c27958192b.tar.zst
pttbbs-d8ab24df1d1aa454e23d7ee162c160c27958192b.zip
bug fix
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@114 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/cache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c
index b7f58866..d62652a8 100644
--- a/mbbsd/cache.c
+++ b/mbbsd/cache.c
@@ -1,4 +1,4 @@
-/* $Id: cache.c,v 1.14 2002/04/15 20:00:22 in2 Exp $ */
+/* $Id: cache.c,v 1.15 2002/04/16 10:07:19 in2 Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -1055,6 +1055,8 @@ int updatemdcache(const char *CPATH, const char *fpath)
while( (len = read(sourcefd, buf, sizeof(buf))) > 0 )
if( write(targetfd, buf, len) < len ){
/* md is full? */
+ close(targetfd);
+ unlink(cpath);
}
close(targetfd);
lseek(sourcefd, 0, SEEK_SET);