Return ENOENT rather than EBADF from MSVCRT_fopen() when file doesn't

exist.
This commit is contained in:
2005-05-05 16:48:28 +00:00 committed by Alexandre Julliard
parent 45d47c422f
commit 759263042e
1 changed files with 1 additions and 1 deletions

View File

@ -2360,7 +2360,7 @@ MSVCRT_FILE* MSVCRT_fopen(const char *path, const char *mode)
}
TRACE(":got (%p)\n",file);
if (!file)
if (fd >= 0 && !file)
_close(fd);
UNLOCK_FILES();
return file;