cvs: php-src(PHP_5_1) /main fopen_wrappers.c

From: Date: Fri, 17 Mar 2006 10:42:31 +0000
Subject: cvs: php-src(PHP_5_1) /main fopen_wrappers.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-37313@lists.php.net to get a copy of this message
dmitry Fri Mar 17 10:42:31 2006 UTC Modified files: (Branch: PHP_5_1) /php-src/main fopen_wrappers.c Log: Eliminated unnecessary getcwd() syscall http://cvs.php.net/viewcvs.cgi/php-src/main/fopen_wrappers.c?r1=1.175.2.2&r2=1.175.2.3&diff_format=u Index: php-src/main/fopen_wrappers.c diff -u php-src/main/fopen_wrappers.c:1.175.2.2 php-src/main/fopen_wrappers.c:1.175.2.3 --- php-src/main/fopen_wrappers.c:1.175.2.2 Sun Jan 1 12:50:17 2006 +++ php-src/main/fopen_wrappers.c Fri Mar 17 10:42:31 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fopen_wrappers.c,v 1.175.2.2 2006/01/01 12:50:17 sniper Exp $ */ +/* $Id: fopen_wrappers.c,v 1.175.2.3 2006/03/17 10:42:31 dmitry Exp $ */ /* {{{ includes */ @@ -518,9 +518,13 @@ char cwd[MAXPATHLEN]; char *result; - result = VCWD_GETCWD(cwd, MAXPATHLEN); - if (!result) { + if (IS_ABSOLUTE_PATH(filepath, strlen(filepath))) { cwd[0] = '\0'; + } else{ + result = VCWD_GETCWD(cwd, MAXPATHLEN); + if (!result) { + cwd[0] = '\0'; + } } new_state.cwd = strdup(cwd);

« previous php.cvs (#37313) next »