Am 08.12.2010 um 18:12 schrieb Enrico Forestieri:

> Anyway, we should chase a platform-dependent bug. Now I am shooting
> in the dark, but makeRelPath() calls os::common_path() to decide
> whether a common prefix exists, and in os_unix.cpp I see:
> 
> docstring::size_type common_path(docstring const & p1, docstring const & p2)
> {
>       docstring::size_type i = 0;
>       docstring::size_type const p1_len = p1.length();
>       docstring::size_type const p2_len = p2.length();
> #ifdef __APPLE__
>       while (i < p1_len && i < p2_len && uppercase(p1[i]) == uppercase(p2[i]))
>               ++i;
> #else
>       while (i < p1_len && i < p2_len && p1[i] == p2[i])
>               ++i;
> #endif
> ...
> }
> 
> and in makeRelPath() (in filetools.cpp) we have:
> 
>       docstring::size_type i = os::common_path(abspath, basepath);
> 
>       if (i == 0) {
>               // actually no match - cannot make it relative
>               return abspath;
>       }
> 
> So, next question would be: is uppercase() doing well on Mac?

Ok, this I could test... and it did not help.

Stephan

Do not apply! :-)

Index: src/support/os_unix.cpp
===================================================================
--- src/support/os_unix.cpp     (Revision 36773)
+++ src/support/os_unix.cpp     (Arbeitskopie)
@@ -77,13 +77,8 @@
        docstring::size_type i = 0;
        docstring::size_type const p1_len = p1.length();
        docstring::size_type const p2_len = p2.length();
-#ifdef __APPLE__
-       while (i < p1_len && i < p2_len && uppercase(p1[i]) == uppercase(p2[i]))
-               ++i;
-#else
        while (i < p1_len && i < p2_len && p1[i] == p2[i])
                ++i;
-#endif
        if ((i < p1_len && i < p2_len)
            || (i < p1_len && p1[i] != '/' && i == p2_len)
            || (i < p2_len && p2[i] != '/' && i == p1_len))

Reply via email to