summaryrefslogtreecommitdiff
path: root/main/php_virtual_cwd.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2000-04-21 14:42:20 +0000
committerAndi Gutmans <andi@php.net>2000-04-21 14:42:20 +0000
commit36faff14b16aba798035f33fe0041b4ae7674784 (patch)
tree209ddb33176b16a33380ceed8ab49311164b687b /main/php_virtual_cwd.c
parent12e319b09124cb9cf4658d8f3cd739a4b1efb5a7 (diff)
downloadphp-git-36faff14b16aba798035f33fe0041b4ae7674784.tar.gz
- Small fix to virtual_Chdir_file() to include the trailing slash when
the file is in the root directory.
Diffstat (limited to 'main/php_virtual_cwd.c')
-rw-r--r--main/php_virtual_cwd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/php_virtual_cwd.c b/main/php_virtual_cwd.c
index fdb7685db3..5f00e4c2d6 100644
--- a/main/php_virtual_cwd.c
+++ b/main/php_virtual_cwd.c
@@ -345,6 +345,9 @@ CWD_API int virtual_chdir_file(char *path)
return virtual_chdir(path);
}
+ if (length == COPY_WHEN_ABSOLUTE) { /* Also use trailing slash if this is root */
+ length++;
+ }
temp = (char *) malloc(length+1);
memcpy(temp, path, length);
temp[length] = 0;