Overview: When there is dir/file in Trash, error "Could not delete file <filename>" appears during emptying Trash but Trash is made empty. Steps to Reproduce: 1) mkdir test.d and touch test.d/test.txt 2) Delete test.d on Thunar (moved to Trash) 3) Choose 'Empty Trash' on Thunar Actual result: Error 'Could not delete file "test.txt".' appeared. Trash was made empty. Expected result: The error should not be appeared. Build & Platform: Build 20011-01-21 on Arch Linux Versions: git/master Repeatability: Always
I can reproduce it here. It's a bit weird but I'll look into it. Thanks for providing the steps to reproduce, they are very helpful and precise.
The Trash specification that is implemented in GVfs has this to say about erasing directories from the trash: "If a directory was trashed in its entirety, it is easiest to undelete it or remove it from the trash only in its entirety as well, not as separate files. The user might not have the permissions to delete some files in it even while he does have the permission to delete the directory!" This is from the "Implementation notes" section and I guess the GVfs folks decided to implement that way. Fixed in master and the xfce-4.8 branch: commit bcdceffe0a292aa6ef24f149b746c9d5f15977be Author: Jannis Pohlmann <jannis@xfce.org> Date: Mon Jan 24 19:52:39 2011 +0100 Only erase top-level items from trash (bug #7147). Apparently, the GVfs trash backend only allows top-level directories in the trash to be modified. Children can be deleted implicitely but e.g. when emptying the trash, only the top-level items may be deleted. To give an example: g_file_delete() fails for "trash:///test/foo.txt" but succeeds for "trash:///test".
*** Bug 7278 has been marked as a duplicate of this bug. ***