summaryrefslogtreecommitdiff
path: root/TSRM
diff options
context:
space:
mode:
authorDaniel Beulshausen <dbeu@php.net>2001-03-23 08:33:06 +0000
committerDaniel Beulshausen <dbeu@php.net>2001-03-23 08:33:06 +0000
commit8889397ba8ae511a08b6dce66ad0e5faebd82eaf (patch)
tree6ebb1c8ea1792c640d8ce50c40e1673bde6bddca /TSRM
parentcd1b11d2b7bdb6dd545399af5b8c434d8efd09fb (diff)
downloadphp-git-8889397ba8ae511a08b6dce66ad0e5faebd82eaf.tar.gz
support unc style paths
Diffstat (limited to 'TSRM')
-rw-r--r--TSRM/tsrm_virtual_cwd.c3
-rw-r--r--TSRM/tsrm_virtual_cwd.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c
index b82b6f8587..0e54b0996f 100644
--- a/TSRM/tsrm_virtual_cwd.c
+++ b/TSRM/tsrm_virtual_cwd.c
@@ -313,6 +313,9 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
copy_amount = COPY_WHEN_ABSOLUTE;
is_absolute = 1;
#ifdef TSRM_WIN32
+ } else if(IS_UNC_PATH(path_copy, path_length)){
+ copy_amount = 1;
+ is_absolute = 1;
} else if(IS_SLASH(path_copy[0])) {
copy_amount = 2;
#endif
diff --git a/TSRM/tsrm_virtual_cwd.h b/TSRM/tsrm_virtual_cwd.h
index 7ea7aa4cbf..b47159a0ff 100644
--- a/TSRM/tsrm_virtual_cwd.h
+++ b/TSRM/tsrm_virtual_cwd.h
@@ -51,6 +51,8 @@ typedef unsigned short mode_t;
#define COPY_WHEN_ABSOLUTE 2
#define IS_ABSOLUTE_PATH(path, len) \
(len >= 2 && isalpha(path[0]) && path[1] == ':')
+#define IS_UNC_PATH(path, len) \
+ (len >= 2 && IS_SLASH(path[0]) && IS_SLASH(path[1]))
#else
#ifdef HAVE_DIRENT_H