bug in gnome-desktop or nautilus ?



Heya,

While trying to make the DND from the Totem video canvas to the Nautilus
desktop working, I noticed a bunch of bugs in nautilus/gnome-desktop.

I drag and drop a video from the Totem video canvas. The SelectionData
for this drop contains the URI to the file being played (which sometimes
isn't accessible through gnome-vfs, like pnm:// URIs).

Nautilus receives it, I skip the boring stuff, it gets to:
nautilus/src/file-manager/fm-icon-view.c: icon_view_handle_uri_list ()

Skip to the first occurence of gnome_desktop_item_new_from_file ().
That's our problem. What we expect from it is:
- We're DND'ing a directory -> create a ditem from that
- We're DND'ing a .desktop item -> create a ditem from that
- We're DND'ing something that isn't a dir or a .desktop item -> return
NULL.

The problem is that there aren't any checks in gnome-desktop as to
wether it's a ditem or not, see:
http://bugzilla.gnome.org/show_bug.cgi?id=105222

(I don't think this patch is the sole reason of that bug, but anyway)

Problem is that it will try and load the ditem from the file we're
DND'ing:
So, if I'm playing a 600 megs film in Totem, and I DND it to the
nautilus desktop, it will read the whole file to create a ditem from it!
(and create a .desktop file with "No Name" as the title, and with loads
of junk inside)

We could work around that problem in Nautilus by checking for the
mime-type before trying to gnome_desktop_item_new_from_file () it.

Comments ?

PS: CC: me as I'm not on the list
-- 
/Bastien Nocera
http://hadess.net

#2  0x4205a2cc in printf ("Oh my %s\n", preferred_deity) from
/lib/i686/libc.so.6 printf ("Oh my %s\n", preferred_deity);
Segmentation fault




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]