summaryrefslogtreecommitdiffstats
path: root/mbbsd/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/cache.c')
-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);