GNOME Bugzilla – Bug 432904
Can't load arbitrary location in file chooser
Last modified: 2018-02-13 15:56:26 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."
the bug is on https://bugs.launchpad.net/bugs/108366
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.
That matches my experience in attempting to patch the Ubuntu sources, although I haven't tried against the trunk.
Thanks. Bug #436429 has been filed against GTK, along with a test program.
This is definitely not a problem with Totem, but with GTK+.
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
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.
*** This bug has been marked as a duplicate of bug 382479 ***