Hello,

On 10/4/06, Pierre <[EMAIL PROTECTED]> wrote:
Hello,

On 10/4/06, Edin Kadribasic <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> We need to fix http://bugs.php.net/bug.php?id=38989 before the release.
> Some change has broken path handling on windows recently.

tsrm_virtual_cwd.c 1.74.2.9.2.3 is the last working version
(http://cvs.php.net/viewvc.cgi/TSRM/tsrm_virtual_cwd.c?revision=1.74.2.9.2.3&view=markup&pathrev=PHP_5_2)

There is a *lot* of changes, but as far as I can see, IS_ABSOLUTE_PATH
is broken.  It is used in expand_filepath, for example:

Please find a possible fix as attachment, I did not test it
intensivelly but it seems to work. Edin, can you take a look at it?

It is actually a wonder that this kind of paths worked before Dmitry's commit :)

--Pierre
RCS file: /repository/TSRM/tsrm_virtual_cwd.h,v
retrieving revision 1.48.2.5.2.2
diff -u -w -b -r1.48.2.5.2.2 tsrm_virtual_cwd.h
--- tsrm_virtual_cwd.h  4 Oct 2006 13:24:19 -0000       1.48.2.5.2.2
+++ tsrm_virtual_cwd.h  4 Oct 2006 22:49:11 -0000
@@ -69,7 +69,7 @@
 #define IS_UNC_PATH(path, len) \
        (len >= 2 && IS_SLASH(path[0]) && IS_SLASH(path[1]))
 #define IS_ABSOLUTE_PATH(path, len) \
-       (len >= 2 && ((isalpha(path[0]) && path[1] == ':') || IS_UNC_PATH(path, 
len)))
+       (len >= 2 && ((isalpha(path[0]) && path[1] == ':') || IS_UNC_PATH(path, 
len) || ( len>0 && IS_SLASH(path[0])&&!IS_UNC_PATH(path, len)  )))
 
 #elif defined(NETWARE)
 #ifdef HAVE_DIRENT_H
-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to