[redland-dev] Bug report

Paul Keogh paul.keogh at anam.com
Tue Oct 21 17:33:44 BST 2003


>
> 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?

It could all be down to the way I (ab)use your API. My code is

	strcpy (scanpath, directory);
	strcat (scanpath, "/*.rdf");

	if ((h = FindFirstFile (scanpath, &wfd)) == INVALID_HANDLE_VALUE) {
		error (0, "load_rdf_repository: Directory scan failed for (%s)",
directory);
		return -1;
	}

	sprintf (rdffile, "file://%s/%s", directory, wfd.cFileName);

	if ((uri = librdf_new_uri (world, rdffile)) == NULL) {
		error (0, "load_rdf_repository: librdf_new_uri() failed for (%s)",
rdffile);
		FindClose (h);
		return -1;
	}

where directory = c:\...

I need to specify a drive identifier because redland calls fopen() to
ultimately load
the RDF file. So I guess there is a bug and looking for : in the authority
part fixes
it nicely.

I think there is a function in an MS Internet SDK to parse URIs but I think
its
better to roll your own.







More information about the redland-dev mailing list