summaryrefslogtreecommitdiff
path: root/TSRM
diff options
context:
space:
mode:
authorMark A. Hershberger <mah@debian.(none)>2009-03-25 00:38:30 -0400
committerMark A. Hershberger <mah@debian.(none)>2009-03-25 00:38:30 -0400
commit1f589a2bd44ba835ad1b009a5d83abd453724829 (patch)
treeec84d715d1ff049cc61f5eaf18db21eb7f3bab40 /TSRM
parentbb01389fbd53ec1cbcb80d0681a37cca1267891a (diff)
downloadphp-1f589a2bd44ba835ad1b009a5d83abd453724829.tar.gz
Imported Upstream version 5.2.5upstream/5.2.5
Diffstat (limited to 'TSRM')
-rw-r--r--TSRM/tsrm_virtual_cwd.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c
index 4b9345378..71c830fc9 100644
--- a/TSRM/tsrm_virtual_cwd.c
+++ b/TSRM/tsrm_virtual_cwd.c
@@ -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 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
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 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
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 @@ no_realpath:
}
}
+ /* 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);
}