[redland-dev] Bug report

Dave Beckett dave.beckett at bristol.ac.uk
Tue Oct 21 16:53:37 BST 2003


On Tue, 21 Oct 2003 14:54:48 +0100, Paul Keogh <paul.keogh at anam.com> wrote:

> 
> Module: raptor/raptor_uri.c
> Function: raptor_uri_uri_string_to_filename()
> Environment: WIN32, VC++ 6.0
> 
> Description: I think the handling of device specifier (eg c:) in
> WIN32 pathnames is incorrect. Specifically, I think the code;
> 
> #ifdef WIN32
>   if(authority) {
>     len+=strlen(authority);
>     p=strchr(authority, '|');
> 
> should be
> 
> #ifdef WIN32
>   if(authority) {
>     len+=strlen(authority);
>     p=strchr(authority, ':');
> 
> and subsequent comments and logic in the code seem to suggest this.
> 
> Before this change, the subsequent fopen () was on \\d:\... which failed.
> Afterwards the fopen () was on d:\... which succeeded.
> 
> (or have I missed the plot :-) ?)

I implemented this code without testing it on MS Windows, since I don't use it.
(I did test faking it with #define WIN32).   It does look my code doesn't
match the comments at that point.  The detailed examples near
raptor_uri_filename_to_uri_string might need to be changed.

There is no specification of file: uris anywhere, and I did look but
couldn't find anything for MS windows on MSDN's public pages, so most of
this is trying to follow common practice.  In this case, I followed what
Perl did.

I'm sure I've seen file://C|/foo/bar uris - maybe that was in Netscape's
browsers rather than in the IE browser which may or may not be
part of MS windows.   Maybe I need to look for both '|' and ':'
in the authority part?

Somebody told me there is a MS windows API call that can do some of this
but if I'm nearly correct, I'd rather just fix this.

So, maybe can you check if file://C|/foo/bar and file://C:/foo/bar are both needed?

Dave





More information about the redland-dev mailing list