From d411d720537506fe60d4d3035e16a62d4dae976a Mon Sep 17 00:00:00 2001 From: foobar Date: Fri, 23 Dec 2005 18:57:39 +0000 Subject: [PATCH] MFH:fix mkdir() function properly (patch by nlopess) --- TSRM/tsrm_virtual_cwd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index 8955bd8234..de126e6c7a 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -480,9 +480,9 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func { int new_path_length; - new_path_length = GetLongPathName(path, NULL, 0) + 1; + new_path_length = GetLongPathName(path, NULL, 0); if (new_path_length == 0) { - return 1; + goto php_failed_getlongpath; } /* GetLongPathName already counts the \0 */ @@ -496,6 +496,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func path_length = new_path_length; } else { free(new_path); +php_failed_getlongpath: new_path = NULL; } } -- 2.50.1