Return ENOENT rather than EBADF from MSVCRT_fopen() when file doesn't
exist.
This commit is contained in:
parent
45d47c422f
commit
759263042e
|
@ -2360,7 +2360,7 @@ MSVCRT_FILE* MSVCRT_fopen(const char *path, const char *mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE(":got (%p)\n",file);
|
TRACE(":got (%p)\n",file);
|
||||||
if (!file)
|
if (fd >= 0 && !file)
|
||||||
_close(fd);
|
_close(fd);
|
||||||
UNLOCK_FILES();
|
UNLOCK_FILES();
|
||||||
return file;
|
return file;
|
||||||
|
|
Loading…
Reference in New Issue