summaryrefslogtreecommitdiff
path: root/TSRM
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2003-10-29 21:14:17 (GMT)
committerAndi Gutmans <andi@php.net>2003-10-29 21:14:17 (GMT)
commit14288507624a87f106d2cde01a26b8b02cf2abb4 (patch)
treeec11ac29d70de4717783253dcb2394c9154ead5a /TSRM
parent73be3af983d41b01b2f39c0dfe5300e8d05a194a (diff)
downloadphp-14288507624a87f106d2cde01a26b8b02cf2abb4.tar.gz
- Allow for case-insensitivity of include_once()/require_once() on
- Windows
Diffstat (limited to 'TSRM')
-rw-r--r--TSRM/tsrm_virtual_cwd.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c
index 060ba4e..97ab1e3 100644
--- a/TSRM/tsrm_virtual_cwd.c
+++ b/TSRM/tsrm_virtual_cwd.c
@@ -332,6 +332,24 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
free(tmp);
}
#endif
+#ifdef TSRM_WIN32
+ {
+ char *dummy;
+ char *new_path;
+ int new_path_length;
+
+ new_path_length = GetFullPathName(path, 0, 0, &dummy) + 1;
+ new_path = (char *) malloc(new_path_length);
+ if (!new_path) {
+ return 1;
+ }
+
+ GetFullPathName(path, new_path_length, new_path, &dummy);
+ free(path);
+ path = new_path;
+ path_length = new_path_length;
+ }
+#endif
free_path = path_copy = tsrm_strndup(path, path_length);
old_state = (cwd_state *) malloc(sizeof(cwd_state));