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 587039 - FileChooserButton get_current_folder returns wrong path
FileChooserButton get_current_folder returns wrong path
Status: RESOLVED DUPLICATE of bug 557689
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.16.x
Other All
: Normal major
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
: 586953 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-06-26 11:50 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 (654 bytes, text/x-csrc)
2009-06-26 11:51 UTC, Dirk Vanden Boer
Details

Description Dirk Vanden Boer 2009-06-26 11:50:19 UTC
Please describe the problem:
When I manually enter a path and hit enter in the FileChooserButton the wrong
path is returned by get_current_folder().


Steps to reproduce:
1. Compile the attached test-case with gcc `pkg-config --cflags --libs gtk+-2.0`
main.c -o test
2. run ./test 
3. Click on the FileChooserButton, select other, enter "/tmp/" in the location bar and press enter. The file chooser button will now show "tmp".
4. Close the window, the return value of gtk_file_chooser_get_current_folder will be printed in the console


Actual results:
The console prints the path of my home directory

Expected results:
The console prints /tmp/

Does this happen every time?
Yes

Other information:
Comment 1 Dirk Vanden Boer 2009-06-26 11:51:03 UTC
Created attachment 137416 [details]
Minimal testcase to reproduce the problem
Comment 2 Federico Mena Quintero 2009-06-26 17:22:33 UTC
You can reproduce this with that test program like this:

1. Run the program.

2. Click on the file chooser button.

3. Click on the "Other" option in the drop-down menu.

4. Click on a directory in the file list, and click the Open button.

5. Close the window.

However, the following change produces the expected result:

4. *Double-click* on a directory in the file list, and click the Open button.

Maybe something got broken in SELECT_FOLDER mode.  Clicking on a folder and then activating the dialog should make the chooser accept that folder as the selection.
Comment 3 Bastien Nocera 2009-08-10 11:30:25 UTC
Is this the same problem as bug 557689?
Comment 4 Federico Mena Quintero 2009-08-10 19:06:51 UTC
Yeah, this seems to be the same.  Thanks for catching this, Hadess.

*** This bug has been marked as a duplicate of 557689 ***
Comment 5 Murray Cumming 2009-09-21 09:20:04 UTC
*** Bug 586953 has been marked as a duplicate of this bug. ***