Commit 75926304 authored by 's avatar Committed by Alexandre Julliard

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

exist.
parent 45d47c42
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment