Show the right error message when open/fdopen fails to open a temp

file because it already exists.
This commit is contained in:
Andy McFadden 2002-10-10 00:46:03 +00:00
parent edc69e56ca
commit e08ee80f12

View File

@ -834,6 +834,10 @@ Nu_OpenTempFile(char* fileName, FILE** pFp)
int fd;
fd = open(fileName, O_RDWR|O_CREAT|O_EXCL|O_BINARY, 0600);
if (fd < 0) {
err = errno ? errno : kNuErrFileOpen;
goto bail;
}
*pFp = fdopen(fd, kNuFileOpenReadWriteCreat);
if (*pFp == nil) {