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);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to