Kind reader:

 

As far as I can tell, this does not apply to ISSUES 4099, 3609, or 2028, all of 
which reference svn_uri_is_canonical.

 

The following URIs return TRUE from svn_uri_is_canonical:

 

1) file:///MyHost/path

 

2) file:///C:dir/path

 

3) file:///c=dir/path

 

I believe the problem is with code at or about dirent_uri.c -- line 1795:

 

      /* If this is a file url, ptr now points to the third '/' in

         file:///C:/path. Check that if we have such a URL the drive

         letter is in uppercase. */

      if (strncmp(uri, "file:", 5) == 0 &&

          ! (*(ptr+1) >= 'A' && *(ptr+1) <= 'Z') &&

          *(ptr+2) == ':')

        return FALSE;

 

This condition evaluates to FALSE (and does not return FALSE) as soon as 
*(prt+1) is determined to be uppercase.

 

This renders the additional check *(ptr+2) == ':' as moot, but I believe this 
check is also invalid, as demonstrated by URI 3)
above.  If *(ptr+2) != ':' the condition is still FALSE and the routine does 
not return FALSE as it should.

 

I respectfully submit the following correction for your consideration:

 

      if (strncmp(uri, "file:", 5) == 0 &&

          ! (*(ptr+1) >= 'A' && *(ptr+1) <= 'Z' &&

             *(ptr+2) == ':' && *(ptr+3) == '/')

   )

        return FALSE;

 

If you concur with my finding of this issue, I welcome hints, pointers, or 
guidance as to the proper way to raise this issue through
proper channels.

 

Thank you for your cycles,

 

Jim O'Leary

Reply via email to