Re: URIs vs. half-baked URIs [glib PATCH]



On Friday, August 3, 2001, at 05:57  PM, Alex Larsson wrote:

+    uri = g_strconcat ("file://", utf8_filename, NULL);
Is it better to use file:///etc rather than file:/etc (you have to chose 
one as the canonical form when writing a function like this)?
We did that in Nautilus and gnome-vfs, but I don't know why. If we make 
the change to use the shorter version as the canonical form, we must be 
careful to handle the hostname == "" case the same as the hostname == NULL 
case.
I'd like to see some tests, too. I don't like having a complicated 
function like this without tests, especially since it's so easy to do 
tests on a function that just deals with text and doesn't do any I/O or 
user interaction. The gshell tests in glib have a nice idiom in there for 
testing functions that return GError.
    -- Darin

_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]