Date: Wed Sep 15 09:52:18 CEST 2004
User: Derick Rethans
Directory: xdebug
Log Message:
[0.10]
- Added Shane's clarifications for our file:// mangling function.
Modified files:
xdebug/usefulstuff.c (version: 1.23)
[FILE: /xdebug/usefulstuff.c]
===================================================================
RCS file: cvstemp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- xdebug/usefulstuff.c:1.22 Mon Aug 30 12:00:20 2004 GMT
+++ xdebug/usefulstuff.c Wed Sep 15 05:52:18 2004 GMT
@@ -293,7 +293,8 @@
/* encode the url */
encoded_fileurl = xdebug_raw_url_encode(fileurl, strlen(fileurl), &new_len, 1);
- if (fileurl[0] != '/' && fileurl[0] != '\\') {
+ if (fileurl[0] != '/' && fileurl[0] != '\\' && fileurl[1] != ':') {
+ /* convert relative paths */
cwd_state new_state;
char cwd[MAXPATHLEN];
char *result;
@@ -314,12 +315,16 @@
free(new_state.cwd);
} else if (fileurl[1] == '/' || fileurl[1] == '\\') {
+ /* convert UNC paths (eg. \\server\sharepath) */
tmp = xdebug_sprintf("file:/%s", encoded_fileurl);
} else if (fileurl[0] == '/' || fileurl[0] == '\\') {
+ /* convert *nix paths (eg. /path) */
tmp = xdebug_sprintf("file://%s", encoded_fileurl);
} else if (fileurl[1] == ':') {
+ /* convert windows drive paths (eg. c:\path) */
tmp = xdebug_sprintf("file:///%s", encoded_fileurl);
} else {
+ /* no clue about it, use it raw */
tmp = xdstrdup(encoded_fileurl);
}
l = strlen(tmp);
Received on Wed Sep 15 2004 - 09:52:30 BST
This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:02 BST