cvs: TSRM(PHP_5_2) / tsrm_virtual_cwd.c

From: Date: Tue, 23 Oct 2007 05:57:35 +0000
Subject: cvs: TSRM(PHP_5_2) / tsrm_virtual_cwd.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-6101@lists.php.net to get a copy of this message
dmitry Tue Oct 23 05:57:35 2007 UTC Modified files: (Branch: PHP_5_2) /TSRM tsrm_virtual_cwd.c Log: Fixed realpath cache for existent file with CWD_FILEPATH flag on win32 http://cvs.php.net/viewvc.cgi/TSRM/tsrm_virtual_cwd.c?r1=1.74.2.9.2.35&r2=1.74.2.9.2.36&diff_format=u Index: TSRM/tsrm_virtual_cwd.c diff -u TSRM/tsrm_virtual_cwd.c:1.74.2.9.2.35 TSRM/tsrm_virtual_cwd.c:1.74.2.9.2.36 --- TSRM/tsrm_virtual_cwd.c:1.74.2.9.2.35 Fri Aug 10 09:09:46 2007 +++ TSRM/tsrm_virtual_cwd.c Tue Oct 23 05:57:35 2007 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tsrm_virtual_cwd.c,v 1.74.2.9.2.35 2007/08/10 09:09:46 tony2001 Exp $ */ +/* $Id: tsrm_virtual_cwd.c,v 1.74.2.9.2.36 2007/10/23 05:57:35 dmitry Exp $ */ #include <sys/types.h> #include <sys/stat.h> @@ -489,6 +489,9 @@ int ret; int use_cache; int use_relative_path = 0; +#ifdef TSRM_WIN32 + int is_unc; +#endif TSRMLS_FETCH(); use_cache = ((use_realpath != CWD_EXPAND) && CWDG(realpath_cache_size_limit)); @@ -573,9 +576,6 @@ char *ptr, *path_copy, *free_path; char *tok; int ptr_length; -#ifdef TSRM_WIN32 - int is_unc; -#endif no_realpath: #ifdef TSRM_WIN32 @@ -738,7 +738,12 @@ } } + /* Store existent file in realpath cache. */ +#ifdef TSRM_WIN32 + if (use_cache && !is_unc) { +#else if (use_cache && (use_realpath == CWD_REALPATH)) { +#endif realpath_cache_add(path, path_length, state->cwd, state->cwd_length, t TSRMLS_CC); }

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