currently in the 1.0 and trunk Thunar uses the following logic to find the mount point. This approach works most of the time, except in cases where the same device is mounted multiple times using the bind option. for example if I mount /dev/sda1 to /data #mount /dev/sda1 /data and then mount a directory inside /data to a different mount point #mount -o bind /data/repository/subversion /var/lib/svn then in some cases the .Trash folder will be created in /data/repository/subversion instead of /data this is because exo_mount_point_list_active will return a list of mount points out of order such as / /data/repository/subversion /data ... etc.. so when the _thunar_vfs_io_trash_new_trash_info function loops through this list it will find the incorrect directory first. Because it is just matching the device. possible solution is to check the mount point and see if it was mounted using the bind option -- I don't even know if there is an function that does this -- and skip onto the next mount point. here's the code that loops through the list, I haven't done complete research on whether this is the only place. /thunar-vfs/thunar-vfs-io-trash.c _thunar_vfs_io_trash_new_trash_info function ... #else /* ...and really messy otherwise (surprise!) */ GSList *mount_points, *lp; dev_t dev = statb.st_dev; /* check if any of the mount points matches (really should) */ mount_points = exo_mount_point_list_active (NULL); for (lp = mount_points; lp != NULL; lp = lp->next) { /* stat this mount point, and check if it's the device we're searching */ if (stat (((ExoMountPoint *) lp->data)->folder, &statb) == 0 && (statb.st_dev == dev)) { /* got it, remember the folder of the mount point */ mount_point = g_strdup (((ExoMountPoint *) lp->data)->folder); break; } } g_slist_foreach (mount_points, (GFunc) exo_mount_point_free, NULL); g_slist_free (mount_points); #endif
Close bug reports of archived products.