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.
Created attachment 260 patch fixing DnD
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)?
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.
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...
Ok, committed something that should work, but I don't have any files to test it on.
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.