svn: /php/php-src/ branches/PHP_5_4/main/fopen_wrappers.c trunk/main/fopen_wrappers.c

From: Date: Tue, 26 Jul 2011 09:27:53 +0000
Subject: svn: /php/php-src/ branches/PHP_5_4/main/fopen_wrappers.c trunk/main/fopen_wrappers.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-65606@lists.php.net to get a copy of this message
pajoye Tue, 26 Jul 2011 09:27:53 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=313700 Log: - simplify Changed paths: U php/php-src/branches/PHP_5_4/main/fopen_wrappers.c U php/php-src/trunk/main/fopen_wrappers.c Modified: php/php-src/branches/PHP_5_4/main/fopen_wrappers.c =================================================================== --- php/php-src/branches/PHP_5_4/main/fopen_wrappers.c 2011-07-26 09:16:36 UTC (rev 313699) +++ php/php-src/branches/PHP_5_4/main/fopen_wrappers.c 2011-07-26 09:27:53 UTC (rev 313700) @@ -628,19 +628,14 @@ filename_length = strlen(filename); /* Relative path open */ - if (*filename == '.') { - return php_fopen_and_set_opened_path(filename, mode, opened_path TSRMLS_CC); - } - + if ((*filename == '.') /* Absolute path open */ - if (IS_ABSOLUTE_PATH(filename, filename_length)) { + || IS_ABSOLUTE_PATH(filename, filename_length) + || (!path || (path && !*path)) + ) { return php_fopen_and_set_opened_path(filename, mode, opened_path TSRMLS_CC); } - if (!path || (path && !*path)) { - return php_fopen_and_set_opened_path(filename, mode, opened_path TSRMLS_CC); - } - /* check in provided path */ /* append the calling scripts' current working directory * as a fall back case Modified: php/php-src/trunk/main/fopen_wrappers.c =================================================================== --- php/php-src/trunk/main/fopen_wrappers.c 2011-07-26 09:16:36 UTC (rev 313699) +++ php/php-src/trunk/main/fopen_wrappers.c 2011-07-26 09:27:53 UTC (rev 313700) @@ -628,19 +628,14 @@ filename_length = strlen(filename); /* Relative path open */ - if (*filename == '.') { - return php_fopen_and_set_opened_path(filename, mode, opened_path TSRMLS_CC); - } - + if ((*filename == '.') /* Absolute path open */ - if (IS_ABSOLUTE_PATH(filename, filename_length)) { + || IS_ABSOLUTE_PATH(filename, filename_length) + || (!path || (path && !*path)) + ) { return php_fopen_and_set_opened_path(filename, mode, opened_path TSRMLS_CC); } - if (!path || (path && !*path)) { - return php_fopen_and_set_opened_path(filename, mode, opened_path TSRMLS_CC); - } - /* check in provided path */ /* append the calling scripts' current working directory * as a fall back case

« previous php.cvs (#65606) next »