g_build_filename and members



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

The File:/ gvfs backend will accept this but if we pass:

g_build_filename("sftp://hostname";, "/home/user/", "foobar.txt", NULL)

it will fail because gvfs sftp backend dont like
sftp:/hostname/home/user/foobar.txt

instead it will have sftp://hostname/home/....

I dont know whish is correct but its seems to me there always should be
two DIR_SEPARATORS at the begining in URIS?

maybe there should be an g_build_uri? or similar?

Greets

Mikael Hermansson






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