com php-src: Switch to ioutil routines to support long path in file cache: ext/opcache/zend_file_cache.c

From: Date: Wed, 11 Jul 2018 12:28:57 +0000
Subject: com php-src: Switch to ioutil routines to support long path in file cache: ext/opcache/zend_file_cache.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-102522@lists.php.net to get a copy of this message
Commit: 9ac133a0b3863ca4d9659140154ee237e5f4669a Author: Anatol Belski <ab@php.net> Wed, 11 Jul 2018 14:28:57 +0200 Parents: 871d0aa5cd01aba5f31f28b641e2b013ac46ec58 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9ac133a0b3863ca4d9659140154ee237e5f4669a Log: Switch to ioutil routines to support long path in file cache Changed paths: M ext/opcache/zend_file_cache.c Diff: diff --git a/ext/opcache/zend_file_cache.c b/ext/opcache/zend_file_cache.c index 36576d8..7dcb9fe 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) {

« previous php.cvs (#102522) next »