After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 102885 - Bug in Glib::build_path
Bug in Glib::build_path
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: general
2.0
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2003-01-08 23:43 UTC by Jarek Dukat
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample code showing the bug. (373 bytes, text/plain)
2003-01-08 23:44 UTC, Jarek Dukat
Details

Description Jarek Dukat 2003-01-08 23:43:02 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.
Comment 1 Jarek Dukat 2003-01-08 23:44:51 UTC
Created attachment 13431 [details]
Sample code showing the bug.
Comment 2 Daniel Elstner 2003-01-09 07:42:35 UTC
Yes, it's unfortunate but we have to reimplement g_build_path() since
it's a varargs function.  I'll look into this.
Comment 3 Daniel Elstner 2003-01-09 11:01:55 UTC
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().