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 586953 - FileChooserButton get_current_folder returns wrong path
FileChooserButton get_current_folder returns wrong path
Status: RESOLVED DUPLICATE of bug 587039
Product: gtkmm
Classification: Bindings
Component: general
2.16.x
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2009-06-25 14:06 UTC by Dirk Vanden Boer
Modified: 2009-09-21 09:20 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Minimal testcase to reproduce the problem (478 bytes, text/x-c++src)
2009-06-25 14:07 UTC, Dirk Vanden Boer
Details

Description Dirk Vanden Boer 2009-06-25 14:06:19 UTC
When I manually enter a path and hit enter in the FileChooserButton the wrong path is returned by get_current_folder().

Steps to reproduce:
Compile the attached test-case with g++ `pkg-config --cflags --libs gtkmm-2.4` main.cpp -o test

run ./test

Click on the FileChooserButton, select other, enter "/tmp/" in the location bar and press enter. The file chooser button will now show "tmp".

Close the window, the return value of get_current_folder() is printed in the console, it will be our home directory.

This does work fine however when you open the directory with the mouse and press open. 

Best regards,
Dirk
Comment 1 Dirk Vanden Boer 2009-06-25 14:07:08 UTC
Created attachment 137368 [details]
Minimal testcase to reproduce the problem
Comment 2 Bert van der Weerd 2009-06-25 18:51:54 UTC
Yes, it's indeed odd behaviour, but I'm not sure if this is a gtkmm bug, it seems a gtk+ bug to me, the get_current_folder() function is defined in
./gtk/gtkmm/filechooser.cc line 374 as a simple wrapper for: 

gchar * gtk_file_chooser_get_current_folder(GtkFileChooser* chooser);
Comment 3 Dirk Vanden Boer 2009-06-26 11:52:07 UTC
Ok, I converted the test case to plain c and filed the bug at http://bugzilla.gnome.org/show_bug.cgi?id=587039
Comment 4 Murray Cumming 2009-09-21 09:20:04 UTC
Thanks. Closing this as a duplicate of that C bug.

*** This bug has been marked as a duplicate of bug 587039 ***