Subject: bug#5436: 23.1.91; Deleting directories causes unusable file layout in freedesktop trashcan

From: Chong Yidong <[email-masked]>
Date: Tue, 26 Jan 2010 11:04:33 -0500

David De La Harpe Golden <[email-masked]> writes:

> Just the delete-directory change _is_ a marked improvement, since it
> does mean that the subsequent failure mode when you try to delete from
> a different filesystem to your /home is less obnoxious:
>
> - Without the delete-directory change, the xdev behaviour is very bad
> indeed:
>
> Say you have /usr/local and /home on different filesystems, as is
> quite common, and you delete-directory a tree in /usr/local with
> delete-by-moving-to-trash on - first, a few leaf regular files from a
> dir of the tree may be moved to trash (flattened), and only a bit
> later the operation will fail, when the first directory rename is
> attempted. Leaving behind a (maybe large) tree that might look
> untouched to casual inspection following an apparently-failed deletion
> operation, but actually with a few files missing, moved to the trash.
> Eek.

I understand what you are saying.  How about conditioning the
delete-directory change on delete-by-moving-to-trash?