diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-04-16 03:06:22 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-04-16 03:06:22 +0800 |
commit | e449477e01540e4eae2ad9099ad2f3c35ddfe2f9 (patch) | |
tree | ddc3c76f3deec974912104089d5a1913be3dce63 /mbbsd/cache.c | |
parent | 2c640a10e0efafdb212636515699d871e035540e (diff) | |
download | pttbbs-e449477e01540e4eae2ad9099ad2f3c35ddfe2f9.tar pttbbs-e449477e01540e4eae2ad9099ad2f3c35ddfe2f9.tar.gz pttbbs-e449477e01540e4eae2ad9099ad2f3c35ddfe2f9.tar.bz2 pttbbs-e449477e01540e4eae2ad9099ad2f3c35ddfe2f9.tar.lz pttbbs-e449477e01540e4eae2ad9099ad2f3c35ddfe2f9.tar.xz pttbbs-e449477e01540e4eae2ad9099ad2f3c35ddfe2f9.tar.zst pttbbs-e449477e01540e4eae2ad9099ad2f3c35ddfe2f9.zip |
*** empty log message ***
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@109 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/cache.c')
-rw-r--r-- | mbbsd/cache.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c index 2182423f..4829c929 100644 --- a/mbbsd/cache.c +++ b/mbbsd/cache.c @@ -1,4 +1,4 @@ -/* $Id: cache.c,v 1.11 2002/04/15 17:11:37 ptt Exp $ */ +/* $Id: cache.c,v 1.12 2002/04/15 19:06:21 ptt Exp $ */ #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -1058,12 +1058,10 @@ 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); - return sourcefd; } - close(sourcefd); - lseek(targetfd, 0, SEEK_SET); - return targetfd; + close(targetfd); + lseek(sourcefd, 0, SEEK_SET); + + return sourcefd; } #endif |