cvs: TSRM / tsrm_virtual_cwd.c
| From: | Dmitry Stogov | Date: | Tue, 20 May 2008 07:41:48 +0000 |
| Subject: | cvs: TSRM / tsrm_virtual_cwd.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-6738@lists.php.net to get a copy of this message | ||
dmitry Tue May 20 07:41:48 2008 UTC
Modified files:
/TSRM tsrm_virtual_cwd.c
Log:
proper fix
http://cvs.php.net/viewvc.cgi/TSRM/tsrm_virtual_cwd.c?r1=1.122&r2=1.123&diff_format=u
Index: TSRM/tsrm_virtual_cwd.c
diff -u TSRM/tsrm_virtual_cwd.c:1.122 TSRM/tsrm_virtual_cwd.c:1.123
--- TSRM/tsrm_virtual_cwd.c:1.122 Mon May 19 10:48:45 2008
+++ TSRM/tsrm_virtual_cwd.c Tue May 20 07:41:48 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tsrm_virtual_cwd.c,v 1.122 2008/05/19 10:48:45 dmitry Exp $ */
+/* $Id: tsrm_virtual_cwd.c,v 1.123 2008/05/20 07:41:48 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