diff options
author | foobar <sniper@php.net> | 2005-12-23 18:56:28 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2005-12-23 18:56:28 +0000 |
commit | 5e40ff6d1ef0b338ca910879523de747984b6cc9 (patch) | |
tree | 8034d09175ad438153d800fe2897c5d4f280f465 /TSRM | |
parent | 5790c9d7277d1e16c56e6a2185d5ac5455a7dd67 (diff) | |
download | php-git-5e40ff6d1ef0b338ca910879523de747984b6cc9.tar.gz |
fix mkdir() function properly (patch by nlopess)
Diffstat (limited to 'TSRM')
-rw-r--r-- | TSRM/tsrm_virtual_cwd.c | 5 |
1 files 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; } } |