summaryrefslogtreecommitdiff
path: root/main/php_virtual_cwd.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2000-06-04 07:59:32 +0000
committerStanislav Malyshev <stas@php.net>2000-06-04 07:59:32 +0000
commit375474ce8632b113d025861308057c44573b2900 (patch)
tree3c563db503cd75524664473bcfb52fb5bcf55596 /main/php_virtual_cwd.c
parent7f158268aa2791572e5e4453cc721869897efaa2 (diff)
downloadphp-git-375474ce8632b113d025861308057c44573b2900.tar.gz
chdir returns -1 on error, so should V_CHDIR
Diffstat (limited to 'main/php_virtual_cwd.c')
-rw-r--r--main/php_virtual_cwd.c4
1 files changed, 2 insertions, 2 deletions
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)