Skip to content

trash-empty: remove files without write bit - #405

Open
curious-rabbit wants to merge 1 commit into
andreafrancia:masterfrom
curious-rabbit:write
Open

trash-empty: remove files without write bit#405
curious-rabbit wants to merge 1 commit into
andreafrancia:masterfrom
curious-rabbit:write

Conversation

@curious-rabbit

Copy link
Copy Markdown

A directory in the trash can lack its write bit. Removing a directory needs the write bit to delete the entries inside it, so trash-empty stopped with "cannot remove" and left the directory, although the user owns it.

trash-empty now adds the write and search bits to the directories it owns before removing them. A directory that cannot even be listed (no read bit) is still left in place and reported.

$ trash-put ~/project
$ chmod -w ~/.local/share/Trash/files/project
$ trash-empty
trash-empty: cannot remove /home/user/.local/share/Trash/files/project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants