From: Stanislav Malyshev Date: Sun, 4 Jun 2000 07:59:32 +0000 (+0000) Subject: chdir returns -1 on error, so should V_CHDIR X-Git-Tag: PRE_EIGHT_BYTE_ALLOC_PATCH~121 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=375474ce8632b113d025861308057c44573b2900;p=php chdir returns -1 on error, so should V_CHDIR --- diff --git a/main/php_virtual_cwd.c b/main/php_virtual_cwd.c index c42f018c3e..412929db15 100644 --- a/main/php_virtual_cwd.c +++ b/main/php_virtual_cwd.c @@ -245,7 +245,7 @@ CWD_API char *virtual_getcwd(char *buf, size_t size) return buf; } - +/* Resolve path relatively to state and put the real path into state */ /* returns 0 for ok, 1 for error */ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path) { @@ -350,7 +350,7 @@ CWD_API int virtual_chdir(char *path) { CWDLS_FETCH(); - return virtual_file_ex(&CWDG(cwd), path, php_is_dir_ok); + return virtual_file_ex(&CWDG(cwd), path, php_is_dir_ok)?-1:0; } CWD_API int virtual_chdir_file(char *path)