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 432904 - Can't load arbitrary location in file chooser
Can't load arbitrary location in file chooser
Status: RESOLVED DUPLICATE of bug 382479
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.18.x
Other Linux
: Normal minor
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
Depends on: 436429
Blocks:
 
 
Reported: 2007-04-24 09:50 UTC by Sebastien Bacher
Modified: 2018-02-13 15:56 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18



Description Sebastien Bacher 2007-04-24 09:50:49 UTC
The bug has been opened on https://bugs.beta.launchpad.net/ubuntu/+source/totem/+bug/108366

"Binary package hint: totem

    When adding to the playlist using the sidebar interface, totem defaults to the directory of the last selected file when prompting for a new file. When that directory is unreadable (e.g. http://www.gearwire.com/media/ (after adding http://www.gearwire.com/media/seymour-duncan-guitar-pickups-1-musikmesse.wmv by pasting into the location control in the last add)), totem presents the message "error accessing 'http://www.gearwire.com/media': Access denied". If this dialog is closed, totem is unable to add new files to the playlist (even when pasting the Location) until a readable base location (e.g. the home directory) is selected.

    In functional terms:

Observed Behaviour:
1) Totem is open, sidebar is open in Playlist mode
2) Click "+" to add a file
3) Paste a location in the Location control (public location given above)
4) Click "Add" to add the location
5) Add interface closes, Totem shows the new file in the playlist
6) Click "+" to add another file
7) Totem presents dialog with "error accessing 'http://www.gearwire.com/media': Access denied"
8) Close dialog
9) Paste another location in the Location control
10) Click "Add" to add the location
11) Nothing happens (no UI changes (except button blink), no message, etc.

Expected Behaviour:
1) Totem is open, sidebar is open in Playlist mode
2) Click "+" to add a file
3) Paste a location in the Location control (public location given above)
4) Click "Add" to add the location
5) Add interface closes, Totem shows the new file in the playlist
6) Click "+" to add another file
7) Totem presents dialog with "error accessing 'http://www.gearwire.com/media': Access denied"
8) Close dialog
9) Paste another location in the Location control
10) Click "Add" to add the location
11) Totem shows the new file in the playlist

Alternate acceptable behaviour:
1) Totem is open, sidebar is open in Playlist mode
2) Click "+" to add a file
3) Paste a location in the Location control (public location given above)
4) Click "Add" to add the location
5) Add interface closes, Totem shows the new file in the playlist
6) Click "+" to add another file
7) Totem presents dialog with "error accessing 'http://www.gearwire.com/media': Access denied"
8) Close dialog
9) Totem defauls to user home directory (or /media, or any known safe location)
10) Paste another location in the Location control
11) Click "Add" to add the location
12) Totem shows the new file in the playlist
...
After some review, this appears to be related to functionality in the GTK File Chooser, designed to prevent saving files to unreadable locations, specifilcally that gtk_file_chooser_set_filename() calls gtk_file_chooser_select_filename, and passes the return value to the caller (FALSE in the case of inaccessible URIs). This then blocks further interaction with the GTK File Chooser until some other URI is selected. Achieving the listed Expected behaviour may have far-reaching consequences.

The Alternate Behaviour looks easier to accomplish with an adjustment to totem-uri.c, by adding return code checking to gtk_file_chooser_set_current_folder_uri shortly after around line 321."
Comment 1 Sebastien Bacher 2007-04-24 10:31:23 UTC
the bug is on https://bugs.launchpad.net/bugs/108366
Comment 2 Philip Withnall 2007-04-28 22:02:28 UTC
Confirmed on trunk. Thanks for the detailed bug report. :-D

I've taken a quick look, and the affected code's moved to around line 383. I tried patching it, but for some reason, gtk_file_chooser_set_current_folder_uri seems to be returning TRUE even though it fails. Before filing a bug report against GTK though, it would probably be best if someone else confirmed this, to make sure I haven't made a stupid mistake.
Comment 3 Emmet Hikory 2007-05-06 14:37:28 UTC
That matches my experience in attempting to patch the Ubuntu sources, although I haven't tried against the trunk.
Comment 4 Philip Withnall 2007-05-06 20:06:38 UTC
Thanks. Bug #436429 has been filed against GTK, along with a test program.
Comment 5 Bastien Nocera 2007-08-31 16:51:50 UTC
This is definitely not a problem with Totem, but with GTK+.
Comment 6 Bastien Nocera 2009-10-22 10:11:26 UTC
gtk2-2.18.2-2.fc12.x86_64

We can't even get the location mentioned in the first mail added using the location bar with the latest GTK+.

1. Popup dialogue
2. Paste URI into filename field:
http://www.gearwire.com/media/seymour-duncan-guitar-pickups-1-musikmesse.wmv
3. Click "Add"
4. Nothing happens
Comment 7 Matthias Clasen 2018-02-10 03:33:07 UTC
We're moving to gitlab! As part of this move, we are closing bugs that haven't seen activity in more than 5 years. If this issue is still imporant to you and
still relevant with GTK+ 3.22 or master, please consider creating a gitlab issue
for it.
Comment 8 Bastien Nocera 2018-02-13 15:56:26 UTC

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