diff options
author | Zeev Suraski <zeev@php.net> | 2001-06-27 14:30:02 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2001-06-27 14:30:02 +0000 |
commit | 44e75b6cddd9969d6cd6b188027806df57287b55 (patch) | |
tree | 17e52f86aea04d1dcd2d78eb0680c5e065697ac2 | |
parent | 540391326c098294504845153f2c43c49a2ea12a (diff) | |
download | php-git-44e75b6cddd9969d6cd6b188027806df57287b55.tar.gz |
Fix UNC path handling
-rw-r--r-- | TSRM/tsrm_virtual_cwd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index 3e8789f8af..db42eccc0e 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -315,7 +315,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func is_absolute = 1; #ifdef TSRM_WIN32 } else if (IS_UNC_PATH(path_copy, path_length)) { - copy_amount = 1; + copy_amount = 2; is_absolute = 1; } else if (IS_SLASH(path_copy[0])) { copy_amount = 2; @@ -366,7 +366,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func state->cwd = (char *) realloc(state->cwd, state->cwd_length+ptr_length+1+1); #ifdef TSRM_WIN32 /* Windows 9x will consider C:\\Foo as a network path. Avoid it. */ - if (state->cwd[state->cwd_length-1]!=DEFAULT_SLASH) { + if (state->cwd[state->cwd_length-1]!='\\' && state->cwd[state->cwd_length-1]!='/') { state->cwd[state->cwd_length++] = DEFAULT_SLASH; } #else |