GNOME Bugzilla – Bug 102885
Bug in Glib::build_path
Last modified: 2004-12-22 21:47:04 UTC
Glibmm reimplements build_path instead of calling g_build_path and does it incorrectly. Glib::build_path is unable to build global path (starting with / on Linux/Unix systems). g_build_path does it correctly. This bug in build_path affects also this function: nuild_filename(const ArrayHandle<string>& elements); because it calls build_path(). Function build_filename(const string& elem1, const string& elem2); is not affected by this bug. It is a great pity that I found this bug a day after Gtkmm 2.2 has been released. I hope to see a fix quickly in 2.2.1 as my project depends on this functionality and now I have to hack a fix for it.
Created attachment 13431 [details] Sample code showing the bug.
Yes, it's unfortunate but we have to reimplement g_build_path() since it's a varargs function. I'll look into this.
Fixed in CVS: 2003-01-09 Daniel Elstner <daniel.elstner@gmx.net> * glib/glibmm/miscutils.{cc,h} (Glib::build_path): Fix to make it behave exactly like g_build_path(). (#102885, Jarek Dukat) (Glib::build_filename(const std::string&, const std::string&)): Implement in terms of Glib::build_path().