diff options
-rw-r--r-- | ext/opcache/zend_file_cache.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c index 36576d892e..7dcb9fe90b 100644 --- a/ext/opcache/zend_file_cache.c +++ b/ext/opcache/zend_file_cache.c @@ -169,7 +169,11 @@ static int zend_file_cache_mkdir(char *filename, size_t start) if (IS_SLASH(*s)) { char old = *s; *s = '\000'; +#ifndef ZEND_WIN32 if (mkdir(filename, S_IRWXU) < 0 && errno != EEXIST) { +#else + if (php_win32_ioutil_mkdir(filename, 0700) < 0 && errno != EEXIST) { +#endif *s = old; return FAILURE; } @@ -832,7 +836,7 @@ int zend_file_cache_script_store(zend_persistent_script *script, int in_shm) #ifndef ZEND_WIN32 fd = open(filename, O_CREAT | O_EXCL | O_RDWR | O_BINARY, S_IRUSR | S_IWUSR); #else - fd = open(filename, O_CREAT | O_EXCL | O_RDWR | O_BINARY, _S_IREAD | _S_IWRITE); + fd = php_win32_ioutil_open(filename, O_CREAT | O_EXCL | O_RDWR | O_BINARY, _S_IREAD | _S_IWRITE); #endif if (fd < 0) { if (errno != EEXIST) { |