I think that some explanations needed: Why do we need this complex part? If we try to call gnome_vfs_uri_append_path(...) with supplied values uri will contain: http://www.somehost.com../relative
I don't think this is what we wanted...
This happens when the number of '..' is odd and it is greater then number of dirs in /path/to/file. if the number of '..' is even, then we will get: http://www.somehost.comrelative
The problem with this code is that it uses uri->text, because I haven't found something like gnome_vfs_uri_set_path(...) If it is OK for private function, I will create patch. If not, how can I do the same thing (changing path without touching other parts of uri) with public or private functions?