diff --git a/checkin_notes b/checkin_notes index 7a8fad0e40..9998674635 100644 --- a/checkin_notes +++ b/checkin_notes @@ -599,3 +599,9 @@ David Jan 15 2008 create_profile.php lib/ filesys.C + +David Jan 15 2008 + - API: fix to zip code (from Carl C) + + zip/zip/ + z_fileio.c diff --git a/zip/zip/z_fileio.c b/zip/zip/z_fileio.c index 0e92665453..b6aefaef79 100644 --- a/zip/zip/z_fileio.c +++ b/zip/zip/z_fileio.c @@ -862,10 +862,13 @@ char *zip; /* path name of zip file to generate temp name for */ #ifdef _WIN32 return mktemp(t); #else - if (mkstemp(t)) - return t; - else - return NULL; + int fd = mkstemp(t); + if (fd) { + close(fd); + return t; + } else { + return NULL; + } #endif /* MKSTEMP */ #endif /* NO_MKTEMP */ #endif /* TANDEM */