mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
set errno in ioutil access routine
This commit is contained in:
parent
6dbfd4287b
commit
d8403aa019
1 changed files with 6 additions and 2 deletions
|
@ -230,7 +230,7 @@ PW32IO int php_win32_ioutil_access_w(const wchar_t *path, mode_t mode);
|
|||
__forceinline static int php_win32_ioutil_access(const char *path, mode_t mode)
|
||||
{/*{{{*/
|
||||
PHP_WIN32_IOUTIL_INIT_W(path)
|
||||
int ret;
|
||||
int ret, err;
|
||||
|
||||
if (!pathw) {
|
||||
SET_ERRNO_FROM_WIN32_CODE(ERROR_INVALID_PARAMETER);
|
||||
|
@ -239,10 +239,14 @@ __forceinline static int php_win32_ioutil_access(const char *path, mode_t mode)
|
|||
|
||||
PHP_WIN32_IOUTIL_CHECK_PATH_W(pathw, -1)
|
||||
|
||||
/* TODO set errno. */
|
||||
ret = _waccess(pathw, mode);
|
||||
_get_errno(&err);
|
||||
PHP_WIN32_IOUTIL_CLEANUP_W()
|
||||
|
||||
if (0 > ret) {
|
||||
_set_errno(err);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}/*}}}*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue