mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
don't get invalid chmod mode through
This commit is contained in:
parent
dea14fc707
commit
9968129831
1 changed files with 14 additions and 0 deletions
|
@ -1566,6 +1566,20 @@ CWD_API int virtual_chmod(const char *filename, mode_t mode) /* {{{ */
|
|||
return -1;
|
||||
}
|
||||
|
||||
#ifdef ZEND_WIN32
|
||||
{
|
||||
mode_t _tmp = mode;
|
||||
|
||||
mode = 0;
|
||||
|
||||
if (_tmp & _S_IREAD) {
|
||||
mode |= _S_IREAD;
|
||||
}
|
||||
if (_tmp & _S_IWRITE) {
|
||||
mode |= _S_IWRITE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
ret = chmod(new_state.cwd, mode);
|
||||
|
||||
CWD_STATE_FREE_ERR(&new_state);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue