Restoring dir from trash to a path where is a dir with the same name but different permissions leads to wiping from trash and loosing data
I can't really figure if that is expexted behaviour from Thunar, but somehow I happend to lose some data by this.
Steps to reproduce:
- From Thunar move dir which owner is current user to Trash.
- Create dir with 700 permissions as different user.
- Open Trash from Thunar, select deleted dir from step 1 and choose restore action.
- You will see expected warning "This folder already contains folder "...". Do you want to replace the existing folder with the following folder?". Choose Replace.
- You will see "Error opening file "whatever subdir was been inside deleted dir". Permissions denied. Do you want to skip it?". Choose Skip. This error shows only one time, disregarding other subdirs.
- After that, the directory that you tried to restore is gone from trash. Also, as it should be, nothing was restored to or replaced on directory from step 2.
I also checked .local/share/Trash and parent directory of deleted directory with testdisk and did not see any previously deleted files and directories. I suppose that more expected of skip action from step 5 was stop trying to restore subdir to that location, but keep it on trash rather than erasing.
Tested with thunar 4.16.11-2 packaged by Arch Linux, 5.19.13-arch1-1, Filesystem Ext4