From: Andi Gutmans Date: Wed, 29 Oct 2003 21:14:17 +0000 (+0000) Subject: - Allow for case-insensitivity of include_once()/require_once() on X-Git-Tag: RELEASE_2_0_0RC1~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14288507624a87f106d2cde01a26b8b02cf2abb4;p=php - Allow for case-insensitivity of include_once()/require_once() on - Windows --- diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index 060ba4eaa0..97ab1e3ade 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -331,6 +331,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);