! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
DnD of directories with escaped characters doesn't work
Status:
VERIFIED: FIXED
Product:
Xfmedia
Component:
playlist

Comments

Description Arwed v. Merkatz 2005-06-15 10:35:48 CEST
Dropping a directory with spaces or other characters that get uri-escaped
doesn't work as the code doesn't unescape the uri before checking if it's a
directory.
Comment 1 Arwed v. Merkatz 2005-06-15 10:37:10 CEST
Created attachment 260 
patch fixing DnD
Comment 2 Brian J. Tarricone (not reading bugmail) 2005-06-15 16:18:41 CEST
Hey, cool, didn't notice that function.  I haven't checked yet, but won't that
make the URL unusable by xfmedia if it's a HTTP URL (e.g., dropped from a web
browser)?
Comment 3 Arwed v. Merkatz 2005-06-15 16:49:18 CEST
Created attachment 261 
patch fixing DnD of directories

You're right, g_filename_from_uri will return NULL if the given string isn't a
file:// uri, here's a fixed patch that uses the original uri in that case.
Comment 4 Brian J. Tarricone (not reading bugmail) 2005-06-15 18:42:07 CEST
Perhaps I'm missing something...  Does g_filename_from_uri() return NULL if the
URI passed isn't a file:// URI?  The API docs don't seem to indicate how this
works, but it seems to me that it would return just the filename portion, and
then (since you pass NULL for the hostname parameter) discard the hostname. 
This is definitely not what we want.

Also, if conversion failed (e.g., if the data received isn't ASCII), we'll get
back NULL (and have no idea why, as you're ignoring errors), and we still need
to handle it properly (stripping off "file://" if it's there).

Unfortunately, nothing is ever as simple as it seems...
Comment 5 Brian J. Tarricone (not reading bugmail) 2005-06-16 05:09:25 CEST
Ok, committed something that should work, but I don't have any files to test it on.
Comment 6 Arwed v. Merkatz 2005-06-16 09:52:36 CEST
The API docs don't say that clearly, but g_filename_from_uri returned NULL for
everything that wasn't a file uri. Yes I did ignore error checking as I thought
that text/uri-list was required to contain only valid ascii escaped values as
nautilus, konqueror and rox always did that in my tests.
Anyway, I tested the latest svn and it works like a charm, thanks.

Bug #1008

Reported by:
Arwed v. Merkatz
Reported on: 2005-06-15
Last modified on: 2005-06-16

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
0 users

Version

Attachments

patch fixing DnD (892 bytes, patch)
2005-06-15 10:37 CEST , Arwed v. Merkatz
no flags
patch fixing DnD of directories (968 bytes, patch)
2005-06-15 16:49 CEST , Arwed v. Merkatz
no flags

Additional information