Comment 16 for bug 34247

Revision history for this message
David M. Carney (carney1979) wrote :

This was found on a blogger's site. She seems to indicate a very familar problem with Gnome's trash in NetBSD.

Web site is:

Relevant text is:

 Fixing GNOME's trash under NetBSD

For a very long long time (probably since forever), the trash icon in GNOME has not worked in NetBSD. You'd drag files onto it and they were appropriately deleted but, unfortunately, the trash did not update its status to reflect the removed files. If you opened the folder, it appeared empty despite ~/.Trash contained the deleted files. As you can image this was very annoying as it made the trash near to useless.

However, and by pure luck, some days ago I noticed that the trash icon showed some files on my machine. For a moment I thought that the problem had been fixed with GNOME 2.14.0. But I was wrong: ~/.Trash didn't contain the files shown in the trash window; the files were really stored in /vol/data/.Trash-jmmv. So why was it picking up the files from one directory but not from the other one?

I started by looking for the .Trash string in gnome-vfs which led me to a piece of code that returns the trash directory for a given volume. I first thought that there could be a problem detecting the home directory so I added some debugging messages there; everything looked correctly.

After digging some more and thanks to the test/test-volume test utility, I ended up in the libgnomevfs/gnome-vfs-filesystem-type.c file. This contains a table called fs_data that maps each file system name to a description and to a boolean. The boolean indicates whether the file system is supposed to hold a trash or not. As you can imagine, ffs was not part of this list, so the code felt back to the default values that specify that there was no trash.

Solving the issue was trivial. I just had to add the appropriate file system names to the table, rebuild gnome-vfs and experience the trash icon to its full power :-) The issue is reported in bug #336533 and is already commited to pkgsrc. Therefore, it will be part of the forthcoming pkgsrc-2006Q1 stable branch.