mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Switch to ioutil routines to support long path in file cache
This commit is contained in:
parent
871d0aa5cd
commit
9ac133a0b3
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user