summaryrefslogtreecommitdiff
path: root/TSRM
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2003-10-29 21:33:05 (GMT)
committerAndi Gutmans <andi@php.net>2003-10-29 21:33:05 (GMT)
commit78cb1bfe67b1718ec49b8ee5124a1dda37720a6f (patch)
treefe4300bf6f409cae37321922d396d64f0d0782ca /TSRM
parente33e8b1f0156afe896aaaf058ca69953829afa15 (diff)
downloadphp-78cb1bfe67b1718ec49b8ee5124a1dda37720a6f.tar.gz
- This should work.
Diffstat (limited to 'TSRM')
-rw-r--r--TSRM/tsrm_virtual_cwd.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c
index 97ab1e3..df6aa2d 100644
--- a/TSRM/tsrm_virtual_cwd.c
+++ b/TSRM/tsrm_virtual_cwd.c
@@ -338,14 +338,19 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
char *new_path;
int new_path_length;
- new_path_length = GetFullPathName(path, 0, 0, &dummy) + 1;
+ new_path_length = GetLongPathName(path, dummy, 0) + 1;
+ if (new_path_length == 0) {
+ return 1;
+ }
new_path = (char *) malloc(new_path_length);
if (!new_path) {
return 1;
}
- GetFullPathName(path, new_path_length, new_path, &dummy);
- free(path);
+ if (GetLongPathName(path, new_path, new_path_length) == 0) {
+ free(new_path);
+ return 1;
+ }
path = new_path;
path_length = new_path_length;
}