cvs: php-src /main fopen_wrappers.c

From: Date: Fri, 17 Mar 2006 10:46:02 +0000
Subject: cvs: php-src /main fopen_wrappers.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-37314@lists.php.net to get a copy of this message
dmitry Fri Mar 17 10:46:02 2006 UTC Modified files: /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.181&r2=1.182&diff_format=u Index: php-src/main/fopen_wrappers.c diff -u php-src/main/fopen_wrappers.c:1.181 php-src/main/fopen_wrappers.c:1.182 --- php-src/main/fopen_wrappers.c:1.181 Wed Mar 8 14:41:45 2006 +++ php-src/main/fopen_wrappers.c Fri Mar 17 10:46:02 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fopen_wrappers.c,v 1.181 2006/03/08 14:41:45 iliaa Exp $ */ +/* $Id: fopen_wrappers.c,v 1.182 2006/03/17 10:46:02 dmitry Exp $ */ /* {{{ includes */ @@ -433,9 +433,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 (#37314) next »