trash-empty: Cannot remove file
**Describe the bug**
When trash-put is used to trash a folder that contains other folders without write permissions, a subsequent trash-empty command will fail
**trash-cli version**
0.24.5.26
**Are you using the latest version of trash-cli?**
Yes
**Have you tried if the bug is present in the latest version of trash-cli?**
Yes
**Operating system:**
- OS: Arch
**To Reproduce**
Copy and paste the commands (and their output) to execute in order to reproduce
the behavior:
$ mkdir -p myfolder/testfolder
$ chmod -w myfolder/testfolder
$ trash-put myfolder
$ trash-empty -f
trash-empty: cannot remove /home/$USER/.local/share/Trash/files/myfolder
**Expected behavior**
Files in the trash should be forcibley overwritten or trash-empty should ask for confirmation before overwritng them
Currently I have to go into the trash directory and run `chmod -R +w myfolder `before I can empty the trash. This should be automated
Note that this bug was discovered by deleting the "go" directory that contains the dependent modules that are downloaded during the build process of go applications. The contained module folders do not have write permissions by default.
8 条评论