[Bug 34247] Re: Trash always empty.

Robert Lange rcl24 at drexel.edu
Mon Nov 20 10:24:37 UTC 2006


I have identified roughly what happened. I have an LS-120 floppy that
was mostly full and I deleted most of the files. (The bug works for
pretty much any writable removable media.) At some point, I discovered
that the files were not deleted but kept in /mount/point/.Trash-rlange,
so I deleted that directory from the command line. (Not yet sure if this
action had anything to do with triggering the bug.) Now, the trash:
functionality (in both Nautilus and the applet) only appears to work
with the floppy media or other removable media. Frankly, I am not sure
if it ever worked on my home directory.

I got the build-deps and source for gnomevfs2 and nautilus. I
instrumented the function called
nautilus_trash_monitor_get_trash_directories(void) in the file
libnautilus-private/nautilus-trash-monitor.c so that it would print
information to a hard-coded file about the execution of each possible
branch in the function's logic. After compiling, installing, and logging
out/in, I got no output. In fact, I only get output when I mount a
removable device, make a file on the device, delete the file (causing my
trash can to activate) and then empty the trash can. Let me restate that
this function apparently is only called when the trash can is emptied.

Here are the three possible branches in logic:

1. gnome-vfs reports that trash is not handled by a volume.

2. gnome-vfs reports that trash *could* be handled by a volume, but
can't find a suitable place to put it.

3. gnome-vfs reports that trash is handled by a volume and gives a
location to put it.

Here is the output of one call to the function:

-----BOF

Entering get_trash_directories...
Found a trash uri: /media/floppy/.Trash-rlange at volume /media/floppy
Did not find a trash uri at volume /var/run
Did not find a trash uri at volume /var/run
Did not find a trash uri at volume /var/lock
Did not find a trash uri at volume /var/lock
Trash reported NOT handled by volume /sys
Trash reported NOT handled by volume /proc/sys/fs/binfmt_misc
Trash reported NOT handled by volume /proc/bus/usb/.usbfs
Did not find a trash uri at volume /proc/bus/usb
Trash reported NOT handled by volume /proc
Did not find a trash uri at volume /lib/modules/2.6.17-10-generic/volatile
Did not find a trash uri at volume /dev/shm
Trash reported NOT handled by volume /dev/pts
Trash reported NOT handled by volume /dev/bus/usb/.usbfs
Did not find a trash uri at volume /dev
Trash reported NOT handled by volume /
Trash reported NOT handled by volume /home/darklord
Trash reported NOT handled by volume /home/rlange
Trash reported NOT handled by volume /home/rlange
Finished get_trash_directories.

-----EOF

I am no nautilus/gnome-vfs expert, but it seems intriguing that
(according to the gnome-vfs function
gnome_vfs_volume_handles_trash(volume) called by the nautilus function I
instrumented) the root and home volumes do not handle trash, and
therefore are ignored by the trash: functionality.

So, where do I look next? I am going to instrument the trash finding
functions in gnomevfs libgnomevfs/gnome-vfs-volume.c unless anyone has a
better idea.

Also, any suggestions about how to run a debugger on nautilus. I tried
with ddd and gdb, but nautilus keeps forking and exiting before I can
look at anything.

-- 
Trash always empty.
https://launchpad.net/bugs/34247




More information about the desktop-bugs mailing list