Re: g_build_filename and members



On Jan 6, 2008 3:43 PM, Mikael Hermansson <mike tielie gmail com> wrote:
> Hmm just saw that g_build_filename does not work for GIO Uris
>
> its simply strips away separator for example:
>
> g_build_filename("file:///", g_get_home_dir(), "foobar.txt", NULL)
>
> will be:
>
> file:/home/user/foobar.txt

It's hard to see how any other result could be right.  You are, after all,
telling it that you have a directory called "file:".

As an aside, the a simple concat of the above would yield something
like file:////home/user/foobar.txt with four slashes in a row.  That would
correspond to the file //home/user/foobar.txt which is [well, can be]
different from /home/user/foobar.txt, but glib/gtk+ gets that difference
wrong.

Does gio properly handle the difference between "file://", "file:///",
and "file:////"?  (Relative filename, absolute filename, and absolute
filename in alternate space respectively.)

Morten


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