Derick Rethans wrote:
> On Thu, 26 Aug 2004, Derick Rethans wrote:
>
>
>>Date: Thu Aug 26 11:18:55 CEST 2004
>>User: Derick Rethans
>>Directory: xdebug
>>
>>Log Message:
>>- Apply Rasmus' patch to redo the path resolving in case his SKIP_PATH_CHECK
>> thingy is used.
>
>
> Can you have a look at it and comment each different check on what it is
> supposed to check for (just an example of the filename). Both Rasmus and
> I had no clue :)
>
> regards,
> Derick
>
I haven't tested this code change so not commiting it, also not 100%
sure about the UNC path comment, have to go back and look at some
history on the old debugger extension.
Index: usefulstuff.c
===================================================================
RCS file: /repository/xdebug/usefulstuff.c,v
retrieving revision 1.21
diff -d -u -r1.21 usefulstuff.c
--- usefulstuff.c 27 Aug 2004 06:58:18 -0000 1.21
+++ usefulstuff.c 27 Aug 2004 17:40:16 -0000
@@ -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, use it raw */
tmp = xdstrdup(encoded_fileurl);
}
l = strlen(tmp);
Received on Fri Aug 27 2004 - 19:41:50 BST
This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:02 BST