cvs: TSRM(PHP_5_2) / tsrm_virtual_cwd.c
| From: | Dmitry Stogov | Date: | Tue, 20 May 2008 07:41:24 +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-6736@lists.php.net to get a copy of this message | ||
dmitry Tue May 20 07:41:24 2008 UTC
Modified files: (Branch: PHP_5_2)
/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.39&r2=1.74.2.9.2.40&diff_format=u
Index: TSRM/tsrm_virtual_cwd.c
diff -u TSRM/tsrm_virtual_cwd.c:1.74.2.9.2.39 TSRM/tsrm_virtual_cwd.c:1.74.2.9.2.40
--- TSRM/tsrm_virtual_cwd.c:1.74.2.9.2.39 Mon May 19 10:49:13 2008
+++ TSRM/tsrm_virtual_cwd.c Tue May 20 07:41:23 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tsrm_virtual_cwd.c,v 1.74.2.9.2.39 2008/05/19 10:49:13 dmitry Exp $ */
+/* $Id: tsrm_virtual_cwd.c,v 1.74.2.9.2.40 2008/05/20 07:41:23 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;
+ }
}
}
}
@@ -742,7 +747,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