cvs: TSRM(PHP_5_3) / tsrm_virtual_cwd.c

From: Date: Tue, 20 May 2008 07:41:36 +0000
Subject: cvs: TSRM(PHP_5_3) / tsrm_virtual_cwd.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-6737@lists.php.net to get a copy of this message
dmitry Tue May 20 07:41:36 2008 UTC Modified files: (Branch: PHP_5_3) /TSRM tsrm_virtual_cwd.c Log: proper fix http://cvs.php.net/viewvc.cgi/TSRM/tsrm_virtual_cwd.c?r1=1.74.2.9.2.35.2.6&r2=1.74.2.9.2.35.2.7&diff_format=u Index: TSRM/tsrm_virtual_cwd.c diff -u TSRM/tsrm_virtual_cwd.c:1.74.2.9.2.35.2.6 TSRM/tsrm_virtual_cwd.c:1.74.2.9.2.35.2.7 --- TSRM/tsrm_virtual_cwd.c:1.74.2.9.2.35.2.6 Mon May 19 10:48:57 2008 +++ TSRM/tsrm_virtual_cwd.c Tue May 20 07:41:35 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_virtual_cwd.c,v 1.74.2.9.2.35.2.6 2008/05/19 10:48:57 dmitry Exp $ */ +/* $Id: tsrm_virtual_cwd.c,v 1.74.2.9.2.35.2.7 2008/05/20 07:41:35 dmitry Exp $ */ #include <sys/types.h> #include <sys/stat.h> @@ -491,6 +491,7 @@ int use_relative_path = 0; #ifdef TSRM_WIN32 int is_unc; + int exists; #endif TSRMLS_FETCH(); @@ -589,6 +590,7 @@ CWD_STATE_COPY(&old_state, state); #ifdef TSRM_WIN32 + exists = (use_realpath != CWD_EXPAND); ret = 0; is_unc = 0; if (path_length >= 2 && path[1] == ':') { @@ -696,13 +698,16 @@ ptr_length = length; FindClose(hFind); ret = 0; - } else if (use_realpath == CWD_REALPATH) { + } else { if (is_unc) { /* skip share name */ is_unc--; ret = 0; } else { - ret = 1; + exists = 0; + if (use_realpath == CWD_REALPATH) { + ret = 1; + } } } } @@ -743,7 +748,7 @@ /* Store existent file in realpath cache. */ #ifdef TSRM_WIN32 - if (use_cache && !is_unc && (use_realpath == CWD_REALPATH)) { + if (use_cache && !is_unc && exists) { #else if (use_cache && (use_realpath == CWD_REALPATH)) { #endif

« previous php.zend-engine.cvs (#6737) next »