g_file_trash() should return PERMISSION_DENIED if files can't be deleted
The bug has been reported initially on https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/422012
'How to reproduce:
jimmy@jimmy:~/tmp$ mkdir test
jimmy@jimmy:~/tmp$ mkdir test/root
jimmy@jimmy:~/tmp$ touch test/root/file
jimmy@jimmy:~/tmp$ sudo chown root:root test/root/ test/root/file
Then delete ~/tmp/test in nautilus and empty the Trash. Now the Trash can seems to be empty, but the folder has been silently moved to:
jimmy@jimmy:~/.local/share/Trash/expunged$ ls
3010044318
jimmy@jimmy:~/.local/share/Trash/expunged$ ls -al 3010044318/root/
total 8
drwxr-xr-x 2 root root 4096 2010-05-20 21:42 .
drwx------ 3 jimmy jimmy 4096 2010-05-20 21:42 ..
-rw-r--r-- 1 root root 0 2010-05-20 21:42 file
It's all here.'
That's still an issue in 3.30 and several user reported it as being confusing since the expected to have fred that space but it didn't
Edited by Ondrej Holy