diff options
| author | Christoph M. Becker <cmbecker69@gmx.de> | 2018-08-19 13:52:48 +0200 |
|---|---|---|
| committer | Christoph M. Becker <cmbecker69@gmx.de> | 2018-08-19 13:56:34 +0200 |
| commit | ef1b26f080913652e78eaa037899409030feb645 (patch) | |
| tree | 54a74860ec0a622749628f973b728f5f632babd9 | |
| parent | ac68a423e1676d3191a6fb3870c1cb48765b7fc0 (diff) | |
| download | php-git-ef1b26f080913652e78eaa037899409030feb645.tar.gz | |
Map ERROR_PRIVILEGE_NOT_HELD to EACCES
Attempting to create a symlink on Windows via the CLI SAPI without
administrative rights is likely to fail with ERROR_PRIVILEGE_NOT_HELD.
Therefore we map this Windows error to EACCES to get better diagnostics
and to avoid the assert() failure in debug mode.
| -rw-r--r-- | win32/winutil.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/win32/winutil.c b/win32/winutil.c index 7faf3bf7bf..d719bb6ee5 100644 --- a/win32/winutil.c +++ b/win32/winutil.c @@ -378,6 +378,7 @@ PHP_WINUTIL_API int php_win32_code_to_errno(unsigned long w32Err) /* 1113 */ , { ERROR_NO_UNICODE_TRANSLATION , EINVAL } /* 1168 */ , { ERROR_NOT_FOUND , ENOENT } /* 1224 */ , { ERROR_USER_MAPPED_FILE , EACCES } + /* 1314 */ , { ERROR_PRIVILEGE_NOT_HELD , EACCES } /* 1816 */ , { ERROR_NOT_ENOUGH_QUOTA , ENOMEM } , { ERROR_ABANDONED_WAIT_0 , EIO } }; |
