From 3b6ad85fa9b67a71c7d28c6b56cbf8f376cab0b1 Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Tue, 26 Jul 2011 09:27:53 +0000 Subject: [PATCH] - simplify --- main/fopen_wrappers.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c index 8766aaf893..2c18044b33 100644 --- a/main/fopen_wrappers.c +++ b/main/fopen_wrappers.c @@ -628,16 +628,11 @@ PHPAPI FILE *php_fopen_with_path(const char *filename, const char *mode, const c 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)) { - return php_fopen_and_set_opened_path(filename, mode, opened_path TSRMLS_CC); - } - - if (!path || (path && !*path)) { + || IS_ABSOLUTE_PATH(filename, filename_length) + || (!path || (path && !*path)) + ) { return php_fopen_and_set_opened_path(filename, mode, opened_path TSRMLS_CC); } -- 2.40.0