Trash dir doesn't support file creation, thus disable the Create New menu and button.
BUG: 332463
BUG: 332464
Details
Diff Detail
- Repository
- R318 Dolphin
- Branch
- trash-disable-buttons
- Lint
No Linters Available - Unit
No Unit Test Coverage
src/dolphinmainwindow.cpp | ||
---|---|---|
1369 ↗ | (On Diff #29515) | Is this needed, given the writability check in dolphinviewactionhandler.cpp? And if it is, should it be same same writability check here, instead of a string comparison for "trash"? |
src/dolphinmainwindow.cpp | ||
---|---|---|
1369 ↗ | (On Diff #29515) | This should be handled by KIO (knewfilemenu.cpp) |
Thanks! Still works for me, and the change is nice and small now. I'll let Dolphin's experienced reviewers do the final code review and sign-off.
src/views/dolphinviewactionhandler.cpp | ||
---|---|---|
487–488 | In theory an ioslave could support creating new files but not new folders, so this is wrong. As I said, this problem should be addressed in KNewFileMenu. The short-term workaround is to check whether the url is a trash:/ url. The proper fix would be to implement what was discussed here: https://git.reviewboard.kde.org/r/129741/ |
src/views/dolphinviewactionhandler.cpp | ||
---|---|---|
487–488 |
What's the purpose to create new files in the trash at all? |