Comment 12 for bug 594674

Revision history for this message
Luke (lukekuhn) wrote :

A file in one partition, wherever mounted, cannot be "moved" to any location in another partition, as to place it on a different physical device or a partition of one means copying the file to that location, then deleting it from the original, not just attacking a new path to an existing physical location. If "trash" is a directory in any location, files can only be moved to and from it on the same device or partition as a direct result of this limitation.

A fix for this would require code in a trash manager to copy to trash anything from a different device, deleting it on that device, then copy back to that device and delete from the trash to restore it. This is how "one trash can, many devices" would have to work. Needless to say, trashing any large file would require waiting for copying to complete, as would restoring it. Much of that and many users, especially on slow machines, may prefer separate trash cans for each device.

Consider this result of using such code as proof of what I have just said: : Two empty devices, a file on one, trash on the other. If you could "move" the file to the trash on the other device, then empty trash, a file recovery utility would find TWO copies of the file, one on each device. Since partitions are effectively physical devices as well, that also applies to bind mounts from other partitions.

I don't use the trash at all, instead creating a "secure trash" directory on each magnetic disk that is empted using nautilus-wipe, which does not work from the trash can. Flash drives are worse: they require normal deletion (can use trash) but have to be filled usinng dd to overwrite old files-still won't get everything if a block picks that moment to die and go read-only!