diff options
| author | Anatol Belski <ab@php.net> | 2018-07-11 14:28:57 +0200 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2018-07-11 14:28:57 +0200 |
| commit | 9ac133a0b3863ca4d9659140154ee237e5f4669a (patch) | |
| tree | adbb7607188a520d5fcfe732f5ab05b85d88113d | |
| parent | 871d0aa5cd01aba5f31f28b641e2b013ac46ec58 (diff) | |
| download | php-git-9ac133a0b3863ca4d9659140154ee237e5f4669a.tar.gz | |
Switch to ioutil routines to support long path in file cache
| -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) { |
