On Thu, 31 Jul 2008 18:33:31 +0100 (BST), John-Mark Bell wrote:
All paths passed up from the core will be in Unix format (as it
just strips the scheme + authority off the front). Thus, fetch_filetype()
should be expecting a Unix path.
So it does (I just copied the debug code for this routine without
looking at it). I can fix that at my end then, but that doesn't help
if the path is wrong when fetching files.
(I really, really, don't want to enable UNIX path compatibility, I'd
rather work out a way to use native paths)
> I think I probably need an #ifdef in the code which picks out
> from the URL, so it starts at the eighth character instead of the
> seventh. Maybe this can be a global variable or defined in
> utils/config.h, as I can see it being a problem for other platforms as
> well (eg. Windows).
I really don't like this idea. Platform-specific ifdefs in the core code
suck -- we're trying to phase any remaining ones out.
An alternative might be to add a file_url_to_path() function to the
platform specific directories, and modify the core code so it calls
this rather than converting it itself.